<PackageReference Include="NLog" Version="6.2.2" />

NLog.LayoutRenderers.ExceptionLayoutRenderer

Exception information provided through a call to one of the Logger.*Exception() methods.
public bool BaseException { get; set; }

Gets or sets whether to render innermost Exception from GetBaseException

public string ExceptionDataSeparator { get; set; }

Gets or sets the separator used to concatenate exception data specified in the Format.

public bool FlattenException { get; set; }

Gets or sets whether to collapse exception tree using AggregateException.Flatten()

public string Format { get; set; }

Gets or sets the format of the output. Must be a comma-separated list of exception properties: Message, Type, ShortType, ToString, Method, StackTrace. This parameter value is case-insensitive.

Gets the formats of the output of inner exceptions to be rendered in target. ExceptionRenderingFormat

public string InnerExceptionSeparator { get; set; }

Gets or sets the separator between inner exceptions.

public string InnerFormat { get; set; }

Gets or sets the format of the output of inner exceptions. Must be a comma-separated list of exception properties: Message, Type, ShortType, ToString, Method, StackTrace. This parameter value is case-insensitive.

public int MaxInnerExceptionLevel { get; set; }

Gets or sets the maximum number of inner exceptions to include in the output. By default inner exceptions are not enabled for compatibility with NLog 1.0.

public string Separator { get; set; }

Gets or sets the separator used to concatenate parts specified in the Format.

Initializes a new instance of the ExceptionLayoutRenderer class.

protected virtual void AppendData(StringBuilder sb, Exception ex)

Appends the contents of an Exception's Data property to the specified StringBuilder.

protected virtual void AppendHResult(StringBuilder sb, Exception ex)

Appends the HResult of an Exception to the specified StringBuilder.

protected virtual void AppendMessage(StringBuilder sb, Exception ex)

Appends the Message of an Exception to the specified StringBuilder.

protected virtual void AppendMethod(StringBuilder sb, Exception ex)

Appends the method name from Exception's stack trace to the specified StringBuilder.

protected virtual void AppendProperties(StringBuilder sb, Exception ex)

Appends all the additional properties of an Exception like Data key-value-pairs

protected virtual void AppendSerializeObject(StringBuilder sb, Exception ex)

Appends all the serialized properties of an Exception into the specified StringBuilder.

protected virtual void AppendShortType(StringBuilder sb, Exception ex)

Appends the short type of an Exception to the specified StringBuilder.

protected virtual void AppendSource(StringBuilder sb, Exception ex)

Appends the application source of an Exception to the specified StringBuilder.

protected virtual void AppendStackTrace(StringBuilder sb, Exception ex)

Appends the stack trace from an Exception to the specified StringBuilder.

protected virtual void AppendToString(StringBuilder sb, Exception ex)

Appends the result of calling ToString() on an Exception to the specified StringBuilder.

protected virtual void AppendType(StringBuilder sb, Exception ex)

Appends the type of an Exception to the specified StringBuilder.