MSMQ target
We need volunteers to help maintain and organize this Wiki. Please contact Jarek if you are interested in helping out.
Writes log message to the specified message queue handled by MSMQ.
Supported in


Configuration Syntax
<targets>
<target xsi:type="MSMQ"
name="String"
useXmlEncoding="Boolean"
encoding="Encoding"
layout="Layout"
recoverable="Boolean"
createQueueIfNotExists="Boolean"
label="Layout"
queue="Layout" />
</targets>
Read more about using the Configuration File.<target xsi:type="MSMQ"
name="String"
useXmlEncoding="Boolean"
encoding="Encoding"
layout="Layout"
recoverable="Boolean"
createQueueIfNotExists="Boolean"
label="Layout"
queue="Layout" />
</targets>
Parameters
- General Options
- name - Name of the target.
- Layout Options
- useXmlEncoding - Indicates whether to use the XML format when serializing message.Boolean Default: False
- encoding - Encoding to be used when writing text to the queue.Encoding
- layout - Layout used to format log messages.Layout Required. Default: ${longdate}|${level:uppercase=true}|${logger}|${message}
- Queue Options
- recoverable - Indicates whether to use recoverable messages (with guaranteed delivery).Boolean Default: False
- createQueueIfNotExists - Indicates whether to create the queue if it doesn't exists.Boolean Default: False
- label - Label to associate with each message.Layout Default: NLogBy default no label is associated.
- queue - Name of the queue to write to.Layout Required.To write to a private queue on a local machine use
.\private$\QueueName . For other available queue names, consult MSMQ documentation.




