From 178f6df1f775124e0d0609da2d7f20977685128d Mon Sep 17 00:00:00 2001 From: RandomBuffer <160499735+RandomBuffer@users.noreply.github.com> Date: Wed, 6 Mar 2024 00:10:06 +1100 Subject: [PATCH] Fix C# example for PushProperty. Fix C# example for PushProperty. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f4c2578..600ce17 100644 --- a/README.md +++ b/README.md @@ -276,12 +276,12 @@ using (logger.BeginScope(new Dictionary } ``` -The code above results in the same outcome as if you would push properties in the **ILogger** in Serilog. +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. ```csharp -// Serilog ILogger -using (logger.PushProperty("UserId", "svrooij")) -using (logger.PushProperty("OperationType", "update")) +// Serilog LogContext +using (LogContext.PushProperty("UserId", "svrooij")) +using (LogContext.PushProperty("OperationType", "update")) { // UserId and OperationType are set for all logging events in these brackets }