Last active
March 3, 2017 10:10
-
-
Save Cl3MM/aae88b59007b2b7e2ae42f8e90b0ffc5 to your computer and use it in GitHub Desktop.
NLog.config: redirect Hangfire logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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" | |
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd" | |
autoReload="true" | |
throwExceptions="false" | |
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log"> | |
<targets> | |
<target xsi:type="File" name="f" | |
fileName="${basedir}/logs/${shortdate}.log" | |
layout="${longdate} ${uppercase:${level}} ${message} (${callsite} ${callsite-linenumber})" /> | |
<target name="hangfire" xsi:type="File" | |
fileName="${basedir}/logs/hangfire/${shortdate}.log" | |
layout="${longdate} ${uppercase:${level}} ${message}"> | |
</target> | |
</targets> | |
<rules> | |
<logger name="Hangfire.*" minlevel="Debug" writeTo="hangfire" final="true" /> | |
<logger name="*" minlevel="Debug" writeTo="f" /> | |
</rules> | |
</nlog> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment