Skip to content

Commit 00fb5e7

Browse files
authored
Quick README fix - show services in the UseSerilog() callback signature
1 parent b2f0772 commit 00fb5e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ You can alternatively configure Serilog using a delegate as shown below:
7979

8080
```csharp
8181
// dotnet add package Serilog.Settings.Configuration
82-
.UseSerilog((hostingContext, loggerConfiguration) => loggerConfiguration
82+
.UseSerilog((hostingContext, services, loggerConfiguration) => loggerConfiguration
8383
.ReadFrom.Configuration(hostingContext.Configuration)
8484
.Enrich.FromLogContext()
8585
.WriteTo.Console())
8686
```
8787

88-
This has the advantage of making the `hostingContext`'s `Configuration` object available for configuration of the logger, but at the expense of recording `Exception`s raised earlier in program startup.
88+
This has the advantage of making the `hostingContext`'s `Configuration` object available for configuration of the logger, but at the expense of ignoring `Exception`s raised earlier in program startup.
8989

9090
If this method is used, `Log.Logger` is assigned implicitly, and closed when the app is shut down.

0 commit comments

Comments
 (0)