Ads by Lake Quincy Media

Wiki Navigation

 
Gibraltar - Learn about the best analysis tool for NLog

WhenEmpty layout renderer

NLog documentation is a Wiki, which allows registered users to edit its content.
If you want to contribute, please create a user account and contact Jarek to get edit access.

Outputs alternative layout when the inner layout produces empty result. 

Supported in

Configuration Syntax

${whenEmpty:whenEmpty=Layout:inner=Layout}

or by using ambient property to modify output of other layout renderer:

${other:whenEmpty=Layout}
Read more about using the Configuration File.

Parameters

  • Transformation Options
  • whenEmpty - Layout to be rendered when original layout produced empty result.Layout Required.
  • inner - Wrapped layout.Layout