Skip to content

fanyangxi/log4net.Appender.Msmq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

log4net.Appender.Msmq

This is a log4net appender for MSMQ (Microsoft Message Queuing)

NuGet version

Getting started

Built with Visual Studio 2013, .Net framework 4.0

General explaination:

You can use this appender to write

Configuration sample, to write info to MSMQ:

<appender name="Msmq" type="log4net.Appender.Msmq.MsmqAppender, log4net.Appender.Msmq">
  <QueueName>.\private$\log-test</QueueName>
  <labelLayout value="LOG [%level] %date"/>
  <threshold value="DEBUG" />
  <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%message" />
  </layout>
</appender>

Other sample log4net conversion parttern:
<conversionPattern value="%date [%thread] %-5level %logger (%property{log4net:HostName}) [%ndc] - %message %exception %newline" />
<conversionPattern value="{'date': '%date', 'level': '%level', 'thread': '%thread', 'logger': '%logger', 'message': '%message', 'exception': '%exception'} %n" />

Sample code to read string from MSMQ:

License

https://github.com/fanyangxi/log4net.Appender.Msmq/blob/master/LICENSE

About

A log4net appender for MSMQ (Microsoft Message Queuing)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages