-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Pad Layout Renderer
Rolf Kristensen edited this page Apr 21, 2019
·
6 revisions
Applies padding to another layout output.
Platforms Supported: All
${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}
-
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 theleft
(characters removed from the right) orright
(characters removed from the left). This is independent of the alignment applied when padding shorter strings out topadding
characters. This property was introduced in NLog 4.0. Earlier versions always apply an alignment equivalent toalignmentOnTruncation=left
.PaddingHorizontalAlignment
Default:Left
- Troubleshooting Guide - See available NLog Targets and Layouts: https://nlog-project.org/config
- Getting started
- How to use structured logging
- Troubleshooting
- FAQ
- Articles about NLog
-
All targets, layouts and layout renderers
Popular: - Using NLog with NLog.config
- Using NLog with appsettings.json