Login
log4net
406 просмотров
Перейти к просмотру всей ветки
in Antwort Murr 17.08.15 15:54, Zuletzt geändert 17.08.15 16:37 (MrSanders)
rtfm
https://logging.apache.org/log4net/release/config-examples.html
В примере
MarS82, наверное, точка была лишняя.
https://logging.apache.org/log4net/release/config-examples.html
В ответ на:
This example show how to configure the RollingFileAppender to roll log files on a date period. This example will roll the log file every minute! To change the rolling period adjust the DatePattern value. For example, a date pattern of "yyyyMMdd" will roll every day. See System.Globalization.DateTimeFormatInfo for a list of available patterns.
This example show how to configure the RollingFileAppender to roll log files on a date period. This example will roll the log file every minute! To change the rolling period adjust the DatePattern value. For example, a date pattern of "yyyyMMdd" will roll every day. See System.Globalization.DateTimeFormatInfo for a list of available patterns.
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logfile" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd-HHmm" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
</layout>
</appender>
В примере

В ответ на:
<datePattern value=".yyyyMMdd"/>