A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/NLog/NLog/wiki/Layout-Renderers below:

Layout Renderers · NLog/NLog Wiki · GitHub

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

List of available layout renderers can be found here: https://nlog-project.org/config/?tab=layout-renderers

NLog can also be extended with new custom layout renderers. See also: Extending NLog

NLog Layout-format recognizes the colon-character : as option-delimiter, but only when used inside ${ and }. To avoid unexpected results, then one can escape using back-slash like this: \:. Ex. ${date:format=HH\:mm\:ss}

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 provide own Context state, that can then be rendered by different Layouts. For example by using LogEvent Properties, that can be rendered using using the ${event-properties} renderer.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4