logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: log4net 1.2.12, rolling file appender quits logging after some time
Date Fri, 15 Nov 2013 08:16:33 GMT
On 2013-11-13, Douglas Neary wrote:

> The problem:
> 2 of the 3 logs quit writing after a while (hours, maybe a day or so
> max).

In the past we've had reports where log4net stopped logging when IIS
decided to recycle the appdomain the app was running in.  Could that be
the case for here?

In those other cases the issue seemed to be with the way people
initialize the logging system (so it was properly set up on application
start but not when recycled), but this doesn't seem to be the case

>  In the log4net internal logs, I see the following text written over and over (looks
to be every time logging is attempted)
> log4net: Opening file for writing [c:\logs\logfile2.log] append [False] or
> log4net: Opening file for writing [c:\logs\logfile3.log] append [False]

> The questions:
> Can I get a timestamp emitted (or any other formatting) with log4net internal debugging?
> Any idea how to track down root cause on why these 2 loggers quit logging after a while?

what you see is the result of log4net.Util.LogLog.EmitOutline, which
only logs the message itself.

You can attach a LogReceivedEventHandler to LogLog's LogReceived event
and grab a timestamp from the LogLog instance passed in via args.
Inconvenient, no question.


View raw message