Skip to content

ExceptionData Layout Renderer

Rolf Kristensen edited this page Apr 24, 2022 · 4 revisions

Lookup item in Exception.Data-Dictionary from Exception provided together with the LogEvent. See also How to properly log exceptions.

Platforms Supported: All (Introduced with NLog 5.0)

Configuration Syntax

${exceptiondata:item=String:format=String:BaseException=Boolean}

Parameters

  • Item - Item to lookup in Exception.Data
  • Format - Format for conversion from object to string (@ means serialize object properties into Json-format)
  • BaseException - Render innermost Exception from Exception.GetBaseException(). Boolean. Default: false
Clone this wiki locally