.NET Core 6 demo
mtinnes opened this issue · 0 comments
mtinnes commented
Can we get a demo on using the new .NET 6 program.cs structure with Jsnlog? I'm using the following code, but does not seem to work, getting 404 on the /jsnlog.logger endpoint.
var app = builder.Build();
var logger = app.Logger;
var lifetime = app.Lifetime;
lifetime.ApplicationStarted.Register(() =>
{
var factory = app.Services.GetRequiredService<ILoggerFactory>();
app.UseJSNLog(new LoggingAdapter(factory));
});