ttajic
2/9/2017 - 10:56 AM

log4net.config

log4net.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
   <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
  </configSections>
	   
	   
	   
	   ....
	   
	   
<!-- Primer Rolling log-a : kreira fajle ala identity_server_20160309 po dnevih -->
<log4net debug="true">
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
  <file value="identity_server_" />
  <appendToFile value="true" />
  <rollingStyle value="Date" />
  <maxSizeRollBackups value="10" />
  <maximumFileSize value="100MB" />
  <staticLogFileName value="false" />
  <datePattern value="yyyyMMdd.lo\g" />
  <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%d %-10p %-10u %-22.22c{1} %-18.18M - %m%n" />
  </layout>
</appender>
<root>
  <level value="DEBUG" />
  <appender-ref ref="RollingLogFileAppender" />
</root>
</log4net>