logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baron Schwartz <ba...@sequent.org>
Subject Re: log files get reset at 12:00 noon every day
Date Fri, 28 Oct 2005 15:00:25 GMT
I had this problem as well a while ago.  Upgrading solved it.  Search 
the mail archives for my message for specifics.  Be sure you are using 
the latest versions from the log4net site, not the sourceforge site -- 
it is stale there.

Simon Wallis wrote:
> Yes, datePattern specifies when it should roll over. The pattern I used specifies a daily
roll over. The log files do roll over correctly at midnight. So at midnight last night, a
new log file was created named WS.error.20051028.log (the &quot;log&quot; appends
"log" to the filename).
> 
> But then, why does it roll over again at noon? The log file will be full of entries until
11:59:59, and then the next second the file is empty and starts to record again at 12:00:00.
> 
> Again, this works on my local machine, but on the servers Ive deployed it to it does
the above strange behaviour.
> 
> Does anyone have any clues???
> 
> Simon.
> 
> -----Original message-----
> From: Matthew Brown octavius@gmail.com
> Date: Fri, 28 Oct 2005 05:34:25 -0700
> To: Log4NET User log4net-user@logging.apache.org
> Subject: Re: log files get reset at 12:00 noon every day
> 
> 
>><datePattern value=".yyyyMMdd.&quot;log&quot;" />
>>
>>Isn't datePattern the parameter to specify when the rollover should
>>occur? If it is, you have it set to daily. Not sure why it would
>>choose 12pm rather than 12am but I am curious what effect the
>>&quot;log&quot; string would have on that...
>>
>>On 10/27/05, Simon Wallis <mailing@wallis.ca> wrote:
>>
>>>Hi,
>>>
>>>This is totally weird. Every day at 12:00 noon the log files from our app>
lication get reset. If I check them in the morning, there are entries start> ing in the
night, there's entries throughout the morning, and then exactly > at noon log4net seems
to delete the file and recreate it, so all the entrie> s from midnight until noon are deleted.
>>>
>>>This is only happening in our recently deployed QA and production environ>
ments. It works fine locally. I'm also logging to a database and that is fi> ne. I made
sure that the Regional date settings (in control panel) are the > same, I just have no
idea why this is happening. It is quite bizarre.
>>>
>>>Here is the snipped from my log4net config file:
>>>
>>>        <!-- ERROR LOG - text file that rolls on a daily basis -->
>>>        <appender name="ErrorRollingFileAppender" type="log4net.Appen> der.RollingFileAppender">
>>>                <filter type="log4net.Filter.LevelRangeFilter">
>>>                        <levelMin value="WARN" />
>>>                        <levelMax value="FATAL" />
>>>                </filter>
>>>                <rollingStyle value="Date" />
>>>                <datePattern value=".yyyyMMdd.&quot;log&quot;" />
>>>                <file value="D:\\myfolder\\Logging\\hidc2\\WS.error" />
>>>                <appendToFile value="true" />
>>>                <param name="StaticLogFileName" value="false" />
>>>                <layout type="log4net.Layout.PatternLayout">
>>>                        <conversionPattern value="%d %-7p %c  &quot;%m&>
quot; %P{SessionId} %P{ProfileId} %P{XmlData} %n" />
>>>                </layout>
>>>        </appender>
>>>
>>>Is anything wrong with it?
>>>
>>>Thanks for your help,
>>>Simon.
>>>
> 
> 
> 

Mime
View raw message