Skip to content

rheinspree/NLog.Elmah

 
 

Repository files navigation

NLog.Elmah

Version AppVeyor

ELMAH target for NLog

Extensions to NLog

Usage

Install the library with Nuget

Install-Package NLog.Elmah

Update NLog to the latest version

Update-Package NLog

Read the NLog tutorial

Example config:

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      internalLogFile="c:\temp\nlog-interal.txt" internalLogLevel="Info"
      >

    <targets>
        <target name="target1" xsi:type="Elmah" LogLevelAsType"false"  />
    </targets>

    <rules>
        <logger name="*" minlevel="Info" writeTo="target1" />
    </rules>
</nlog>

config:

  • LogLevelAsType: Use Level as type if logged Exception is null.

Check the internal log (c:\temp\nlog-interal.txt) in case of problems

Also, users can safely ignore the warning it throws for that custom target:

This is an invalid xsi:type 'http://www.nlog-project.org/schemas/NLog.xsd:Elmah'

Notes

Not strong named (SNK) because the dependency isn't strong named.

About

ELMAH target for NLog

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%