Accessing layout renderer values from within a target

15 views
Skip to first unread message

Thomas Ardal

unread,
Feb 20, 2017, 10:25:00 AM2/20/17
to NLog-Users
I was wondering if it is possible to access the values of generated layout renderers from within a target. Let's say I implement a target that want to ping a hostname every time someone logs anything. To do this, I would need to access the value of ${machinename} from within my target. I don't want to add ${machinename} as part of the layout which ends up in the log file (or whatever target I use).

Thomas Ardal

unread,
Feb 27, 2017, 2:45:01 AM2/27/17
to NLog-Users
For future reference, this forum is no longer used and I got an answer here instead: https://github.com/NLog/NLog/issues/1979.
Reply all
Reply to author
Forward
0 new messages