Skip to content

All Event Properties Layout Renderer

Rolf Kristensen edited this page Sep 4, 2023 · 23 revisions

Log event all context data.

Platforms Supported: All

Introduced in NLog v4.0.

To log one property, use ${event-properties}. See also NLog Context.

Configuration Syntax

${all-event-properties:format=String:separator=String:includeEmptyValues=boolean:includeScopeProperties=boolean}

Parameters

Rendering Options

  • format - How key/value pairs will be formatted. The placeholder used to define placement of the key is, [key], and the placeholder for value is, [value].
    • Default value: [key]=[value]
  • separator - The string that will be used to separate key/value pairs. Default value: ,
  • includeCallerInformation - Also render the caller information attributes? Default: false

    Introduced in NLog 4.1. Deprecated with NLog v4.6.8. Removed again with NLog v5 (Net45 required)

  • includeEmptyValues - include empty values? A value is empty when null or in case of a string, null or empty string. Default value: false

    Introduced in NLog 4.6.4.

  • exclude - LogEvent property-key-names to exclude from output. List of keys can be passed as comma separated values, e.g.: Key1,Key2

    Introduced in NLog 4.6.8

  • includeScopeProperties - Include ScopeContext Properties together with LogEvent Properties.

    Introduced in NLog 5.0

Examples

See EventProperties-Layout-Renderer#example

Clone this wiki locally