From c13849cbb87797fec99b62e16986c90da1951707 Mon Sep 17 00:00:00 2001
From: Julian Verdurmen <304NotModified@users.noreply.github.com>
Date: Sat, 25 May 2019 21:33:36 +0200
Subject: [PATCH] remove obsolete, updated docs
---
src/NLog/Logger.cs | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/NLog/Logger.cs b/src/NLog/Logger.cs
index 41b628d3c1..ca727f952c 100644
--- a/src/NLog/Logger.cs
+++ b/src/NLog/Logger.cs
@@ -86,8 +86,8 @@ protected internal Logger()
/// Collection of context properties for the Logger. The logger will append it for all log events
///
///
- /// It is recommended to only use for modifying context properties.
- /// Because direct changes might give unexpected side-effects as multiple locations can share the same logger-object.
+ /// It is recommended to use for modifying context properties
+ /// when same named logger is used at multiple locations or shared by different thread contexts.
///
public IDictionary Properties => _contextProperties ?? System.Threading.Interlocked.CompareExchange(ref _contextProperties, CreateContextPropertiesDictionary(null), null) ?? _contextProperties;
@@ -126,14 +126,21 @@ public Logger WithProperty(string propertyKey, object propertyValue)
}
///
- /// Updates the specified context property for the current logger. The logger will append it for all log events
+ /// Updates the specified context property for the current logger. The logger will append it for all log events.
+ ///
+ /// It could be rendered with ${event-properties:YOURNAME}
+ ///
+ /// With property, all properties could be changed.
///
///
/// Will affect all locations/contexts that makes use of the same named logger object.
///
/// Property Name
/// Property Value
- [Obsolete("Instead use the Properties-property to access or modify the active collection")]
+ ///
+ /// It is recommended to use for modifying context properties
+ /// when same named logger is used at multiple locations or shared by different thread contexts.
+ ///
public void SetProperty(string propertyKey, object propertyValue)
{
if (string.IsNullOrEmpty(propertyKey))