We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bda6f2 commit 942f35fCopy full SHA for 942f35f
README.md
@@ -35,15 +35,10 @@ public class Startup
35
call `AddSerilog()` on the provided `loggerFactory`.
36
37
```csharp
38
- public void Configure(IApplicationBuilder app,
39
- IHostingEnvironment env,
40
- ILoggerFactory loggerfactory,
41
- IApplicationLifetime appLifetime)
+ public void ConfigureServices(IServiceCollection services)
42
{
43
- loggerfactory.AddSerilog();
44
-
45
- // Ensure any buffered events are sent at shutdown
46
- appLifetime.ApplicationStopped.Register(Log.CloseAndFlush);
+ services.AddLogging(loggingBuilder =>
+ loggingBuilder.AddSerilog(dispose: true));
47
```
48
49
That's it! With the level bumped up a little you should see log output like:
0 commit comments