Created
August 14, 2012 21:05
-
-
Save yoeun/3353036 to your computer and use it in GitHub Desktop.
NLog settings in app.config and web.config files
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"?> | |
<configuration> | |
<configSections> | |
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/> | |
</configSections> | |
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<targets> | |
<target name="default" xsi:type="File" | |
fileName="C:\logs\app-log.txt" | |
archiveFileName="C:\logs\archives\app-log.{#}.txt" | |
archiveEvery="Day" | |
archiveNumbering="Rolling" | |
maxArchiveFiles="7" /> | |
<target name="errors" xsi:type="File" | |
fileName="C:\logs\app-errors.txt" | |
archiveFileName="C:\logs\archives\app-errors.{#}.txt" | |
archiveEvery="Day" | |
archiveNumbering="Rolling" | |
maxArchiveFiles="7" /> | |
</targets> | |
<rules> | |
<logger name="*" writeTo="default" /> | |
<logger name="*" minlevel="Error" writeTo="errors" /> | |
</rules> | |
</nlog> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for sharing.