我在 .net core 3.x 上使用 Azure 函数 v3,ILogger<T>
它是通过相应类 T 的依赖注入创建的IServiceProvider like ILogger<T> _log = _log = serviceProvider.GetService<ILogger<T>>();
除了_log.LogMetric()
所有其他日志消息(跟踪、信息、错误、异常等)都被推送到 Application Insight。我检查了事务搜索的跟踪部分以及日志的跟踪和自定义指标。
甚至 host.json 文件日志记录配置似乎也是正确的。那么我做错了什么?