Skip to content

Commit 6f36ca3

Browse files
authored
Update README.md
1 parent d9984e0 commit 6f36ca3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ or in `appsettings.json` file:
3333
"WithCorrelationId",
3434
{
3535
"Name": "WithRequestHeader",
36-
"Args": { "headerName": "Cache-Control"}
36+
"Args": { "headerName": "User-Agent"}
3737
}
3838
],
3939
"WriteTo": [
@@ -113,7 +113,7 @@ or
113113
{
114114
"Name": "WithRequestHeader",
115115
"Args": {
116-
"headerName": "Cache-Control"
116+
"headerName": "User-Agent"
117117
}
118118
},
119119
{
@@ -128,12 +128,12 @@ or
128128
```
129129

130130
#### Note
131-
To include logged headers in `OutputTemplate`, the header name without `-` should be used. For example, if the header name is `Cache-Contol`, you should use `CacheContol`.
131+
To include logged headers in `OutputTemplate`, the header name without `-` should be used. For example, if the header name is `User-Agent`, you should use `UserAgent`.
132132
```csharp
133133
Log.Logger = new LoggerConfiguration()
134134
.MinimumLevel.Debug()
135-
.Enrich.WithRequestHeader("Cache-Contol")
136-
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss}] {Level:u3} {CacheContol} {Message:lj}{NewLine}{Exception}")
135+
.Enrich.WithRequestHeader("User-Agent")
136+
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss}] {Level:u3} {UserAgent} {Message:lj}{NewLine}{Exception}")
137137
```
138138

139139
## Installing into an ASP.NET Core Web Application

0 commit comments

Comments
 (0)