does not read the variables in the config
Closed this issue · 5 comments
with nlog the variables in the config are not used to generate the log
@rgarofalo What properties are important for you to configure with nlog-variables?
I noticed this behavior with an application developed with the 0.20 version and then updated to the latest version, the variables are not reported in the log
example <variable name="haha" value="woot"/>
@rgarofalo Ahh thought you meant configure the target options using NLog varables.
Yes the target no longer includes all NLog variables in its output, because NLog variables are often used for other targets and not always related to a specific target (Avoid random noise in the Logzio-Target).
Instead you have to explicitly specify what NLog variables that should be included in output using contextproperty
(Can also include other things like ${threadid}
, ${machinename}
, etc.):
https://github.com/logzio/logzio-dotnet/blob/master/docs/nlog.md#context-properties
@rgarofalo
Did @snakefoot answer helped with what you need?
it was helpful, thank you very much