我正在尝试将Microsoft.Logging.Extension
与Azure Functions〜2集成。
LogLevel = Error 以下的日志未显示在Azure日志流或Kudu中。在本地运行时,日志确实会显示在控制台中。
我按如下方式创建工厂:
LoggerFactory factory = new LoggerFactory();
factory
.AddAzureWebAppDiagnostics()
.AddConsole();
然后我尝试使用记录器,如下所示:
factory.CreateLogger<TestClass>().LogInformation("This is a test information message.");
我的问题是:除非级别为错误
,否则日志不会显示在Kudu / Azure日志流中我的host.json
文件如下:
{
"version": "2.0",
"singleton": {
"listenerLockPeriod": "00:00:15"
},
"logging": {
"console": {
"isEnabled": "true"
},
"fileLoggingMode": "debugOnly",
"logLevel": {
"default": "Information"
}
}
}
我想念什么?