Skip to content

Commit

Permalink
Note the use of Serilog.Sinks.Async to move writes to background thre…
Browse files Browse the repository at this point in the history
…ad [skip ci]
  • Loading branch information
nblumhardt authored Apr 1, 2022
1 parent 59fe4b1 commit f2351f2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,18 @@ To configure the console sink with a different theme and include the `SourceCont
}
```

### Performance

Console logging is synchronous and this can cause bottlenecks in some deployment scenarios. For high-volume console logging, consider using [_Serilog.Sinks.Async_](https://github.com/serilog/serilog-sinks-async) to move console writes to a background thread:

```csharp
// dotnet add package serilog.sinks.async
Log.Logger = new LoggerConfiguration()
.WriteTo.Async(wt => wt.Console())
.CreateLogger();
```

### Contributing

Would you like to help make the Serilog console sink even better? We keep a list of issues that are approachable for newcomers under the [up-for-grabs](https://github.com/serilog/serilog-sinks-console/issues?labels=up-for-grabs&state=open) label. Before starting work on a pull request, we suggest commenting on, or raising, an issue on the issue tracker so that we can help and coordinate efforts. For more details check out our [contributing guide](CONTRIBUTING.md).
Expand Down

0 comments on commit f2351f2

Please sign in to comment.