C# Class NLog.Targets.MessageQueueTarget

Inheritance: NLog.Targets.TargetWithLayout
显示文件 Open project: loresoft/NLog.Xml Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
MessageQueueTarget ( ) : System.ComponentModel

Initializes a new instance of the MessageQueueTarget class.

The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message}

Protected Methods

Method Description
PrepareMessage ( LogEventInfo logEvent ) : System.Messaging.Message

Prepares a message to be sent to the message queue.

You may override this method in inheriting classes to provide services like encryption or message authentication.

Write ( LogEventInfo logEvent ) : void

Writes the specified logging event to a queue specified in the Queue parameter.

Method Details

MessageQueueTarget() public method

Initializes a new instance of the MessageQueueTarget class.
The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message}
public MessageQueueTarget ( ) : System.ComponentModel
return System.ComponentModel

PrepareMessage() protected method

Prepares a message to be sent to the message queue.
You may override this method in inheriting classes to provide services like encryption or message authentication.
protected PrepareMessage ( LogEventInfo logEvent ) : System.Messaging.Message
logEvent LogEventInfo The log event to be used when calculating label and text to be written.
return System.Messaging.Message

Write() protected method

Writes the specified logging event to a queue specified in the Queue parameter.
protected Write ( LogEventInfo logEvent ) : void
logEvent LogEventInfo The logging event.
return void