Skip to content

Instantly share code, notes, and snippets.

@uhaciogullari
Created December 17, 2014 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uhaciogullari/7ce286802b8e982ede96 to your computer and use it in GitHub Desktop.
Save uhaciogullari/7ce286802b8e982ede96 to your computer and use it in GitHub Desktop.
<?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">
<targets>
<target name="logInfoToFile" xsi:type="File" fileName="${basedir}/../Logs/${shortdate}/InfoLog.txt" layout="${date:format=HH\:mm\:ss\:fff}|${message}" />
<target name="logErrorToFile" xsi:type="File" fileName="${basedir}/../Logs/${shortdate}/ErrorLog.txt" layout="${date:format=HH\:mm\:ss\:fff}|${message}|${exception:format=tostring}" />
<target name="logWarnToFile" xsi:type="File" fileName="${basedir}/../Logs/${shortdate}/WarningLog.txt" layout="${date:format=HH\:mm\:ss\:fff}|${message}" />
</targets>
<rules>
<logger name="*" levels="Info" writeTo="logInfoToFile" />
<logger name="*" levels="Error" writeTo="logErrorToFile" />
<logger name="*" levels="Warn" writeTo="logWarnToFile" />
</rules>
</nlog>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment