D:\Logs\2019\20190803\LOG_A_20190803.txt 형식으로 작성이 된다.
<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<appender name="DebugAppender" type="log4net.Appender.DebugAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="D:\Logs\%date{yyyy}\%date{yyyy}%date{MM}%date{dd}\LOG_" />
<datePattern value="'A_'yyyyMMdd'.txt'" />
<param name="AppendToFile" value="true" />
<param name="rollingStyle" value="Date" />
<staticLogFileName value="false" />
<layout type="log4net.Layout.PatternLayout">
<param name="conversionPattern" value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL"/>
<appender-ref ref="DebugAppender" />
<appender-ref ref="RollingLogFileAppender" />
</root>
</log4net>
'C#' 카테고리의 다른 글
엑셀의 공분산 COVARIANCE.P, COVARIANCE.S 함수의 c#구현 (0) | 2020.08.07 |
---|---|
asp.net core 3.1, NLog 설정시 문제해결 (0) | 2020.06.26 |
GDI+ Bitmap Rotaion (0) | 2019.02.19 |
WPF RichText에서 HTML 표시하기 (2) | 2019.02.09 |
Visual Studio Debug.WriteLine 표시가 안될때 대처 방안 (2) | 2018.11.15 |