Skip to content

NLog/NLog.MSMQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NLog.MSMQ

NLog MSMQ Target for writing to Microsoft Message Queue (MSMQ)

Version AppVeyor

How to install

  1. Install the package

    Install-Package NLog.MSMQ or in your csproj:

    <PackageReference Include="NLog.MSMQ" Version="5.*" />
  2. Add to your nlog.config:

    <extensions>
        <add assembly="NLog.MSMQ"/>
    </extensions>

    Alternative register from code using fluent configuration API:

    LogManager.Setup().SetupExtensions(ext => {
       ext.RegisterTarget<NLog.Targets.MessageQueueTarget>();
    });

Example NLog.config file

Example of using the target "MSMQ" in nlog.config-file:

<nlog>
    <extensions>
        <add assembly="NLog.MSMQ"/>
    </extensions>
    <targets>
        <target name="msmq" xsi:type="MSMQ" layout="${message}"  />
    </targets>
    <rules>
        <logger minLevel="Info" writeTo="msmq" />
    </rules>
</nlog>

About

NLog Target for writing to Microsoft Message Queue - MSMQ

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages