Skip to content

Commit 8911305

Browse files
authored
Add basic usage to README.md [Skip CI]
1 parent ef4daf6 commit 8911305

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1-
# Serilog.Enrichers.Thread
1+
# Serilog.Enrichers.Thread [![Build status](https://ci.appveyor.com/api/projects/status/2vgxdy3swg6eaj3f?svg=true)](https://ci.appveyor.com/project/serilog/serilog-enrichers-thread) [![NuGet Version](http://img.shields.io/nuget/v/Serilog.Enrichers.Thread.svg?style=flat)](https://www.nuget.org/packages/Serilog.Enrichers.Thread/)
22

33
Enrich Serilog events with properties from the current thread.
44

5-
[![Build status](https://ci.appveyor.com/api/projects/status/2vgxdy3swg6eaj3f?svg=true)](https://ci.appveyor.com/project/serilog/serilog-enrichers-thread) [![NuGet Version](http://img.shields.io/nuget/v/Serilog.Enrichers.Thread.svg?style=flat)](https://www.nuget.org/packages/Serilog.Enrichers.Thread/)
5+
### Getting started
6+
7+
Install the package from NuGet:
8+
9+
```powershell
10+
Install-Package Serilog.Enrichers.Thread
11+
```
12+
13+
In your logger configuration, apply `Enrich.WithThreadId()`:
14+
15+
```csharp
16+
Log.Logger = new LoggerConfiguration()
17+
.Enrich.WithThreadId()
18+
.CreateLogger();
19+
```
620

7-
* [Documentation](https://github.com/serilog/serilog/wiki)
821

922
Copyright © 2016 Serilog Contributors - Provided under the [Apache License, Version 2.0](http://apache.org/licenses/LICENSE-2.0.html).

0 commit comments

Comments
 (0)