I'm working on a logger for .NET6 (and .NET Standard 2.0) that logs directly to Elasticsearch. We currently use serilog, but I would like to reduce dependencies on other frameworks.
I looked at the source code for Elastic.Extensions.Logging and I cannot find any "customization" options. A lot of static methods, almost no overrides, no delegates to change LogEvents, ....
Here are some examples of logEvent manipulation that I was thinking of.:
How can we change the user name? Currently the name is obtained from "Thread.CurrentPrincipal?.Identity?.Name". This is not always correct. Sometimes ClaimsPrincipal needs to be used.
How can we add other "enrichers" (to keep with the Serilog terminology?
How can we customize error handling (like logging via another logger in case there is a problem with the Elistic logger.?
Hi all,
I'm working on a logger for .NET6 (and .NET Standard 2.0) that logs directly to Elasticsearch. We currently use serilog, but I would like to reduce dependencies on other frameworks.
I looked at the source code for Elastic.Extensions.Logging and I cannot find any "customization" options. A lot of static methods, almost no overrides, no delegates to change LogEvents, ....
Here are some examples of logEvent manipulation that I was thinking of.:
All information and feedback very welcome.
Peter