-
Notifications
You must be signed in to change notification settings - Fork 0
CsvLayout
A specialized layout that renders CSV-formatted events.
Supported in .NET, Silverlight, Compact Framework and Mono Configuration Syntax
<targets>
<target>
<layout xsi:type="CsvLayout">
<!-- Layout Options -->
<layout xsi:type="layoutType">Layout</layout>
<footer xsi:type="layoutType">Layout</footer>
<header xsi:type="layoutType">Layout</header>
<!-- CSV Options -->
<quoting>Enum</quoting>
<quoteChar>String</quoteChar>
<withHeader>Boolean</withHeader>
<customColumnDelimiter>String</customColumnDelimiter>
<delimiter>Enum</delimiter>
<column layout="Layout" name="String"/> <!-- repeated -->
</layout>
</target>
</targets>
##Parameters ##Layout Options layout - Body layout (can be repeated multiple times). Layout
footer - Footer layout. Layout
header - Header layout. Layout
###CSV Options
quoting - Quoting mode. Default: Auto
Possible values:
- All - Quote all column.
- Auto - Quote only whose values contain the quote symbol or the separator.
- Nothing - Quote nothing.
Hint: To write logs which has multiline data, such as Exception message, you will need to use quotation mark (")
.
quoteChar - Quote Character. Default: "
withHeader - Indicates whether CSV should include header.Boolean
customColumnDelimiter - Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom').
delimiter - Column delimiter. Default: Auto
Possible values:
- Auto - Automatically detect from regional settings.
- Comma - Comma (ASCII 44).
- Custom - Custom string, specified by the CustomDelimiter.
- Pipe - Pipe character (ASCII 124).
- Semicolon - Semicolon (ASCII 59).
- Space - Space character (ASCII 32).
- Tab - Tab character (ASCII 9).
columns - The array of parameters to be passed.Collection
Each collection item is represented by <column /> element with the following attributes:
- layout - Layout of the column.Layout Required.
- name - Name of the column.
- Search in documentation
- Getting started
- Examples
- External articles and tutorials
- FAQ
- Platform support
- Advanced Configuration file options
- Filtering log messages
- [Using Time Sources](Time Source)
- Visual Studio support
- Who is using NLog
- [Write custom extensions](Extending NLog)