最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

.net - Send all logs to Open telemetry Logging in c# - Stack Overflow

programmeradmin5浏览0评论

I'm new to dotnet so this may be answered but I'm not sure what I should be searching to answer this.

We have several web applications which we have recently bootstrapped with open telemetry. With this we have setup the logging and added attributes and endpoints. Our services run in kubernetes.

I've noticed that we still seem to get some logs in the console of the applications.

The question is: How can I setup a logger that I have all logging go to? Do I have to replace a default logger or something like that?

Currently we have this in place.

logging.ClearProviders();
logging.AddOpenTelemetry();
logging.AddConsole();

We added the AddConsole() back because we found that logs just didn't appear in the otel streams.

发布评论

评论列表(0)

  1. 暂无评论