Open bdovaz opened 1 month ago
Hi @bdovaz,
If you just want to use Serilog as a sink, then adding it via your ILoggingBuilder
rather than at the host level will do what you need:
builder.Logging.AddSerilog(..)
The downside is that you will now have two logging frameworks in play, with their own filters, minimum levels, etc., but you should be able to work around that reasonably easily.
Hope this helps, Nick
https://www.nuget.org/packages/Microsoft.Extensions.Telemetry/
This package replaces the
ILoggerFactory
implementation and causes it to collide with theILoggerFactory
implementation of this repository:https://github.com/dotnet/extensions/blob/5752f1d4ac15686432a228099386c709c7dacf74/src/Libraries/Microsoft.Extensions.Telemetry/Logging/LoggingEnrichmentExtensions.cs#L37
I would like to be able to use the Telemetry package at the same time as this Serilog package.
The use of Serilog in my case is because of the need to use certain Sinks (example: OpenSearch), that is why I would like to use all the possible functionalities of
Microsoft.Extensions.Logging
andMicrosoft.Extensions.Telemetry
without coupling to Serilog more than necessary.