![](/img/trans.png)
[英]How can I see SQL events (Application Insights) in the Diagnostic Tools window of Visual Studio 2015 in Console Application without using Azure?
[英]i see entries in then Azure Function Monitor Logs screen. How do I find them in the Application Insights?
我通過單擊Functions/FunctionName/Monitor/Logs
打開 Azure 函數的Functions/FunctionName/Monitor/Logs
。 它顯示“正在連接到 Application Insights...”,然后是“已連接”。 我運行該函數,監視器屏幕顯示由_logger.LogInformation()
調用生成的條目。
然后,我嘗試在 Application Insight 中找到這些條目(特別是第 3 行表示Started orchestration
),但我似乎無法找到。
我在這里缺少什么?
PS 使用 .NET Core 3.1 和 Microsoft.NET.Sdk.Functions 3.0.9。
PPS 解決方案是將"logLevel": {"default": "Information"}
到 host.json,如下所示:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingExcludedTypes": "Request",
"samplingSettings": {
"isEnabled": true
}
},
"logLevel": {"default": "Information"}
}
}
根據官方文檔 -> logging ,您應該指定日志級別,如下所示:
"logLevel": {"default": "your_log_level"}
如果您想記錄information
級別消息(對於所有日志級別,請參閱Log levels ),您應該將其指定為Information
:
"logLevel": {"default": "Information"}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.