Skip to content

Instantly share code, notes, and snippets.

@default-kramer
Created October 10, 2013 14:34
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 default-kramer/6919384 to your computer and use it in GitHub Desktop.
Save default-kramer/6919384 to your computer and use it in GitHub Desktop.
NLog rolling
<?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"
autoReload="true">
<!-- make sure to set 'Copy To Output Directory' option for this file -->
<!-- go to http://nlog-project.org/wiki/Configuration_file for more information -->
<targets>
<target name="file" xsi:type="File"
layout="${longdate}|${level}|${processid}|${logger}${newline} ${message}${newline}${exception:format=ToString}"
fileName="${basedir}/logs/_log.txt"
archiveFileName="${basedir}/logs/log.{#}.txt"
archiveEvery="Day"
archiveNumbering="Rolling"
maxArchiveFiles="30"
concurrentWrites="true"
keepFileOpen="false"
encoding="iso-8859-2" />
</targets>
<rules>
<logger name="*" minlevel="Debug" writeTo="file" />
</rules>
</nlog>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment