Created
July 5, 2013 14:40
-
-
Save ichiroku11/5935000 to your computer and use it in GitHub Desktop.
NLog.configのサンプル
変数定義とファイルを日付でローリング
This file contains hidden or 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"> | |
| <variable | |
| name="layout" | |
| value="${longdate}|${level}|${message}" /> | |
| <targets> | |
| <target | |
| name="file" xsi:type="File" encoding="utf-8" | |
| fileName="${basedir}/Log/${shortdate}.log" | |
| layout="${layout}" /> | |
| <target | |
| name="console" xsi:type="Console" | |
| layout="${layout}" /> | |
| </targets> | |
| <rules> | |
| <logger name="*" minlevel="Info" writeTo="file" /> | |
| <logger name="*" minlevel="Info" writeTo="console" /> | |
| </rules> | |
| </nlog> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment