You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -276,12 +276,12 @@ using (logger.BeginScope(new Dictionary<string, object>
276
276
}
277
277
```
278
278
279
-
The code above results in the same outcome as if you would push properties in the **ILogger** in Serilog.
279
+
The code above results in the same outcome as if you would push properties in the **LogContext** in Serilog. More details can be found in https://github.com/serilog/serilog/wiki/Enrichment#the-logcontext.
280
280
281
281
```csharp
282
-
// Serilog ILogger
283
-
using (logger.PushProperty("UserId", "svrooij"))
284
-
using (logger.PushProperty("OperationType", "update"))
282
+
// Serilog LogContext
283
+
using (LogContext.PushProperty("UserId", "svrooij"))
284
+
using (LogContext.PushProperty("OperationType", "update"))
285
285
{
286
286
// UserId and OperationType are set for all logging events in these brackets
0 commit comments