Chainsaw target
We need volunteers to help maintain and organize this Wiki. Please contact Jarek if you are interested in helping out.
Sends log messages to the remote instance of Chainsaw application from log4j.
Supported in



Configuration Syntax
<targets>
<target xsi:type="Chainsaw"
name="String"
newLine="Boolean"
maxMessageSize="Integer"
onOverflow="Enum"
layout="Layout"
encoding="Encoding"
connectionCacheSize="Integer"
address="Layout"
keepConnection="Boolean"
includeCallSite="Boolean"
includeSourceInfo="Boolean"
appInfo="String"
includeNLogData="Boolean"
includeNdc="Boolean"
includeMdc="Boolean">
<parameter layout="Layout" name="String"/><!-- repeated -->
</target>
</targets>
Read more about using the Configuration File.<target xsi:type="Chainsaw"
name="String"
newLine="Boolean"
maxMessageSize="Integer"
onOverflow="Enum"
layout="Layout"
encoding="Encoding"
connectionCacheSize="Integer"
address="Layout"
keepConnection="Boolean"
includeCallSite="Boolean"
includeSourceInfo="Boolean"
appInfo="String"
includeNLogData="Boolean"
includeNdc="Boolean"
includeMdc="Boolean">
<parameter layout="Layout" name="String"/><!-- repeated -->
</target>
</targets>
Parameters
- General Options
- name - Name of the target.
- Layout Options
- newLine - Indicates whether to append newline at the end of log message.Boolean Default: False
- maxMessageSize - Maximum message size in bytes.Integer Default: 65000
- onOverflow - Action that should be taken if the message is larger than maxMessageSize.
Possible values: - layout - Layout used to format log messages.Layout Required. Default: ${longdate}|${level:uppercase=true}|${logger}|${message}
- encoding - Encoding to be used.Encoding Default: utf-8
- Connection Options
- connectionCacheSize - Size of the connection cache (number of connections which are kept alive).Integer Default: 5

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 v1.0 for .NET Framework 1.0
- NLog v1.0 for .NET Framework 1.1
- NLog v1.0 for .NET Framework 2.0
- address - Network address.LayoutThe network address can be:
- tcp://host:port - TCP (auto select IPv4/IPv6)
- tcp4://host:port - force TCP/IPv4
- tcp6://host:port - force TCP/IPv6
- udp://host:port - UDP (auto select IPv4/IPv6, not supported on Silverlight)
- udp4://host:port - force UDP/IPv4 (not supported on Silverlight)
- udp6://host:port - force UDP/IPv6 (not supported on Silverlight)
- keepConnection - Indicates whether to keep connection open whenever possible.Boolean Default: True
- Payload Options
- includeCallSite - Indicates whether to include call site (class and method name) in the information sent over the network.Boolean
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
- includeSourceInfo - Indicates whether to include source info (file name and line number) in the information sent over the network.Boolean
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
- NLog v2.0 for Silverlight 2.0
- NLog v2.0 for Silverlight 3.0
- NLog v2.0 for Silverlight 4.0
- appInfo - AppInfo field. By default it's the friendly name of the current AppDomain.
- parameters - The collection of parameters. Each parameter contains a mapping between NLog layout and a named parameter.Collection
Each collection item is represented by<parameter />element with the following attributes: - includeNLogData - Indicates whether to include NLog-specific extensions to log4j schema.Boolean
- includeNdc - Indicates whether to include NestedDiagnosticsContext stack contents.Boolean
- includeMdc - Indicates whether to include MappedDiagnosticsContext dictionary contents.Boolean




