You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following setup produces 2 log entries in my OTEL collector using ILogger<>
I want to use serilog as my logging provider because of the rich features it provides. But doing so and enabling OTEL seems like Microsoft logging also is enabled.
I would expect to have an option to disable dotnet built-in logging to send logs to OTEL if the provider is not set.
Am I correct?
Additional context
No response
The text was updated successfully, but these errors were encountered:
varlogger=newLoggerConfiguration().WriteTo.OpenTelemetry().CreateLogger();builder.Services.AddOpenTelemetry().UseOtlpExporter().AddLogging(c =>c.ClearProviders()// Clear built-in ILoggerProviders and the OpenTelemetry one added by UseOtlpExporter.AddSerilog(logger));
May be a bit easier to read this way:
varlogger=newLoggerConfiguration().WriteTo.OpenTelemetry().CreateLogger();builder.Services.AddOpenTelemetry().UseOtlpExporter();builder.Logging.ClearProviders()// Clear built-in ILoggerProviders and the OpenTelemetry one added by UseOtlpExporter.AddSerilog(logger);
What is the question?
The following setup produces 2 log entries in my OTEL collector using ILogger<>
I want to use serilog as my logging provider because of the rich features it provides. But doing so and enabling OTEL seems like Microsoft logging also is enabled.
I would expect to have an option to disable dotnet built-in logging to send logs to OTEL if the provider is not set.
Am I correct?
Additional context
No response
The text was updated successfully, but these errors were encountered: