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
nlog.Debug("Test message", new { clientid=2, color="blue" });
140
139
```
141
140
142
-
Options:
141
+
**Options:**
143
142
144
143
- IncludeEventProperties - Include LogEvent-Properties for structured logging.
145
144
- IncludeMdlc - Include NLog MappedDiagnosticsLogicalContext MDLC-Properties for structured logging.
@@ -166,7 +165,7 @@ Note: Nuget packages are compiled against 2.0.0 (1.2.11) but any newer version w
166
165
</dependentAssembly>
167
166
```
168
167
169
-
Sample config:
168
+
**Sample config:**
170
169
```xml
171
170
<log4net>
172
171
<root>
@@ -193,7 +192,7 @@ Sample config:
193
192
</log4net>
194
193
```
195
194
196
-
Options
195
+
**Options:**
197
196
198
197
- GlobalContext, ThreadContext, and LogicalThreadContext keys are fully supported by setting the parameters in the config as a comma delimited list of keys. See sample config above.
199
198
- CallContextKeys is an additional feature unrelated to log4net that uses the local thread storage for more advanced tracking of context variables. LogicalThreadContext provides the same functionality but uses an internal property collection. We have seen instances where the serialization of that collection can cause exceptions. This was created as an alternative method to the built in function. It is used via CallContext.LogicalSetData(key, value). Research LogicalSetData online to learn more. It is supposed to work better across child Task objects and with async.
@@ -204,7 +203,7 @@ Options
204
203
205
204
log4net does not internally have methods for logging a log message along with an object. Stackify's appenders work fine if you log an object directly or we have created some friendly extension methods to make it easy to log an object with your message at the same time.
0 commit comments