.net - MaximumFileSize set to 1 MB, log4.net still writes 10 MB into the log file? -
i've specified file size maximum of 1 mb writes upto 9696 kb in 1 file:
<?xml version="1.0"?> <configuration> <configsections> <section name="log4net" type="log4net.config.log4netconfigurationsectionhandler, log4net"/> </configsections> <log4net debug="true"> <appender name="rollinglogfileappender" type="log4net.appender.rollingfileappender"> <file value="c:\\temp\\testlog.txt"/> <appendtofile value="true"/> <rollingstyle value="size"/> <maxsizerollbackups value="2"/> <maximumfilesize value="1mb"/> <staticlogfilename value="true"/> <layout type="log4net.layout.patternlayout"> <conversionpattern value="%-5p %d %5rms %-22.22c{1} %-18.18m - %m%n"/> </layout> </appender> <root> <level value="debug"/> <appender-ref ref="rollinglogfileappender"/> </root> </log4net> <startup><supportedruntime version="v4.0" sku=".netframework,version=v4.0"/></startup> </configuration>
Comments
Post a Comment