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
If all you want to do is configure Microsoft's logger to use Serilog, then you shouldn't have to wire up the container
classProgram{staticvoidMain(string[]args){Log.Logger=newLoggerConfiguration().Enrich.FromLogContext().WriteTo.Console().WriteTo.Elasticsearch(newElasticsearchSinkOptions(newUri("http://localhost:9200")){AutoRegisterTemplate=true,AutoRegisterTemplateVersion=AutoRegisterTemplateVersion.ESv6,IndexFormat="zipkin-{0:yyyy.MM.dd}"}).CreateLogger();varloggerFactory=newLoggerFactory(new[]{newSerilogLoggerProvider()});varlogger=loggerFactory.CreateLogger<Program>();using(logger.BeginScope("{@scope}",new{value1="A value",value2="Another value"})){logger.LogInformation("A Microsoft log");}Log.CloseAndFlush();}}
The text was updated successfully, but these errors were encountered:
If all you want to do is configure Microsoft's logger to use Serilog, then you shouldn't have to wire up the container
The text was updated successfully, but these errors were encountered: