diff --git a/src/NLog/Logger.cs b/src/NLog/Logger.cs index 41b628d3c1..33775e3fda 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 sharing the same loggers accross multiple classes. /// 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 sharing the same loggers accross multiple classes. + /// public void SetProperty(string propertyKey, object propertyValue) { if (string.IsNullOrEmpty(propertyKey))