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



Configuration Syntax
<targets>
<target xsi:type="Console"
name="String"
layout="Layout"
footer="Layout"
header="Layout"
error="Boolean" />
</targets>
Read more about using the Configuration File.<target xsi:type="Console"
name="String"
layout="Layout"
footer="Layout"
header="Layout"
error="Boolean" />
</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}
- footer - Footer.Layout
- header - Header.Layout
- Console Options
- error - Indicates whether to send the log messages to the standard error instead of the standard output.Boolean Default: False
This parameter is not supported in:
- NLog v1.0 for .NET Compact Framework 1.0
- NLog v1.0 for .NET Compact Framework 2.0
- NLog v2.0 for .NET Compact Framework 2.0
- NLog v2.0 for .NET Compact Framework 3.5




