You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Sebastian Andersson <sa...@hogia.net> on 2005/06/17 11:15:30 UTC

log4net stops logging.

This is a repost of bug #1012845 on SourceForge.

We are using log4net-1.2.0-beta8 with the MS.Net 1.1 framework on a
dual processor SMP machine running Windows 2000 server.
We run our application as a service and the service is logging a
lot of messages from many threads. The 500kB files are filled in
about 2 minutes.
After some random time (everything from five minutes to a week) the
logging stops. The service continues to work properly, it just doesn't
log anything more. The stop happens in the middle of the files (the
current log file was once 216kiB large), not while the appender is
rotating the files. If we reconfigure the appenders, it starts to log
again.

We configure it with:

<log4net>
    <appender name="RollingFileAppender"
              type="log4net.Appender.RollingFileAppender">
        <param name="File" value="Log/TCMServiceLog.txt" />
        <param name="AppendToFile" value="true" />
        <param name="RollingStyle" value="Size" />
        <param name="MaximumFileSize" value="500KB" />;
        <param name="MaxSizeRollBackups" value="500" />
        <param name="StaticLogFileName" value="true" />
        <layout type="log4net.Layout.PatternLayout">
            <param name="ConversionPattern" value="%d;%-5p;%c;%t;%m%n" />
        </layout>
    </appender>
    <root>
        <level value="INFO" />
        <appender-ref ref="RollingFileAppender" />
    </root>
    <logger name="mon.messaging" >
        <level value="ERROR" />
    </logger>
    <logger name="io.messaging.Hogia" >
        <level value="ERROR" />
    </logger>
    <logger
        name="Hogia.Pts.Pakke2.TCM.TCMTcpConnectionToTCA" >
    <level value="ERROR" />
    </logger>
</log4net>


Are we perhaps doing something incorrectly? We use one logger from many
threads simultaniously, could that cause this?

Regards,
/Sebastian
-- 
                             .oooO o,o Oooo.
                             (   ) \_/ (   )      (o_
"Life is not fair, but root   \ (  /|\  ) / (o_   //\
password helps!" -- The BOFH   \_)     (_/  (/)_  V_/_

Re: log4net stops logging.

Posted by Sebastian Andersson <sa...@hogia.net>.
On Fri, Jun 17, 2005 at 11:15:30AM +0200, Sebastian Andersson wrote:
> Are we perhaps doing something incorrectly? We use one logger from many
> threads simultaniously, could that cause this?

Sorry for the bad report. I just noticed the big warning in the
documentation. I was sure I had already checked it once...

/Sebastian
-- 
                             .oooO o,o Oooo.
                             (   ) \_/ (   )      (o_
"Life is not fair, but root   \ (  /|\  ) / (o_   //\
password helps!" -- The BOFH   \_)     (_/  (/)_  V_/_