ColoredConsole target
If you want to contribute, please create a user account and contact Jarek to get edit access.
Writes log messages to the console with customizable coloring.
Supported in

Configuration Syntax
<targets>
<target xsi:type="ColoredConsole"
name="String"
layout="Layout"
header="Layout"
footer="Layout"
useDefaultRowHighlightingRules="Boolean"
errorStream="Boolean">
<highlight-row backgroundColor="Enum" condition="Condition" foregroundColor="Enum"/><!-- repeated -->
<highlight-word backgroundColor="Enum" foregroundColor="Enum" ignoreCase="Boolean"
regex="String" text="String" wholeWords="Boolean"/><!-- repeated -->
</target>
</targets>
Read more about using the Configuration File.<target xsi:type="ColoredConsole"
name="String"
layout="Layout"
header="Layout"
footer="Layout"
useDefaultRowHighlightingRules="Boolean"
errorStream="Boolean">
<highlight-row backgroundColor="Enum" condition="Condition" foregroundColor="Enum"/><!-- repeated -->
<highlight-word backgroundColor="Enum" foregroundColor="Enum" ignoreCase="Boolean"
regex="String" text="String" wholeWords="Boolean"/><!-- repeated -->
</target>
</targets>
Parameters
- General Options
- name - Name of the target.
- Layout Options
- layout - Text to be rendered.Layout Required. Default: ${longdate}|${level:uppercase=true}|${logger}|${message}
- header - Header.Layout
- footer - Footer.Layout
- Highlighting Rules
- useDefaultRowHighlightingRules - Indicates whether to use default row highlighting rules.Boolean Default: TrueThe default rules are:
Condition Foreground Color Background Color level == LogLevel.Fatal Red NoChange level == LogLevel.Error Yellow NoChange level == LogLevel.Warn Magenta NoChange level == LogLevel.Info White NoChange level == LogLevel.Debug Gray NoChange level == LogLevel.Trace DarkGray NoChange - rowHighlightingRules - The row highlighting rules.Collection
Each collection item is represented by<highlight-row />element with the following attributes:- backgroundColor - Background color. Default: NoChange
Possible values: - condition - Condition that must be met in order to set the specified foreground and background color.Condition Required.
- foregroundColor - Foreground color. Default: NoChange
Possible values:
- wordHighlightingRules - The word highlighting rules.Collection
Each collection item is represented by<highlight-word />element with the following attributes:- backgroundColor - Background color. Default: NoChange
Possible values: - foregroundColor - Foreground color. Default: NoChange
Possible values: - ignoreCase - Indicates whether to ignore case when comparing texts.Boolean Default: False
- regex - Regular expression to be matched. You must specify either
text orregex . - text - Text to be matched. You must specify either
text orregex . - wholeWords - Indicates whether to match whole words only.Boolean Default: False
- Output Options
- errorStream - Indicates whether the error stream (stderr) should be used instead of the output stream (stdout).Boolean Default: False




