Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Pad Layout Renderer

Rolf Kristensen edited this page Apr 21, 2019 · 6 revisions

Applies padding to another layout output.

Platforms Supported: All

Configuration Syntax

${pad:padCharacter=Char:padding=Integer:fixedLength=Boolean
     :inner=Layout:alignmentOnTruncation=PaddingHorizontalAlignment}

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

${other:padding=5}

Parameters

Transformation Options

  • padCharacter - Padding character. Char Default: (space character)
  • padding - Number of characters to pad the output to. Positive padding values cause left padding, negative values cause right padding to the desired width. Integer
  • fixedLength - Indicates whether to trim the rendered text to the absolute value of the padding length. Boolean Default: False
  • inner - Wrapped layout. Layout
  • alignmentOnTruncation - Indicates whether a value that has been truncated due to fixedLength=true is aligned to the left (characters removed from the right) or right (characters removed from the left). This is independent of the alignment applied when padding shorter strings out to padding characters. This property was introduced in NLog 4.0. Earlier versions always apply an alignment equivalent to alignmentOnTruncation=left. PaddingHorizontalAlignment Default: Left

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.