Layout Renderers

Julian Verdurmen edited this page Aug 18, 2018 · 69 revisions

Layout renderers are template macros that are used in Layouts, e.g. ${message}, ${level} etc

NLog supports creating custom layout renderers. For more information, see: Extending NLog

Layout Renderers

All layout renderers could be found here: http://nlog-project.org/config/?tab=layout-renderers

Passing Custom Values to a Layout

Even though the layout renderers provide many pre-defined values, you may need to pass application specific values to your Layouts. You can pass your own values in code by adding custom properties to the event. You then retrieve the value using the ${event-properties} renderer. See the documentation for the ${event-properties} for an example.

Clone this wiki locally
You can’t perform that action at this time.
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.
Press h to open a hovercard with more details.