I don't remember the details completely, but I'm pretty sure that this was a
bug that was fixed sometime last year.
>From what I remember, rolling daily didn't work correctly in timezones West of
>GMT.
Dave
-----Original Message-----
From: Baron Schwartz [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 26, 2005 2:37 PM
To: [email protected]
Subject: Logging truncates the file at noon
Hi,
I've searched Google and the Eyebrowse for this and can't find anything
relevant (EyeBrowse seems to have a lot of issues -- about half the links
I click on just lead to a stacktrace). I'm not sure if this is an issue
with log4net or my configuration. Any pointers are much appreciated.
Problem: my log files are rolled daily, but every day at noon the existing
data is blanked out of the log (the file is truncated). The effect is
that when I look at yesterday's file, I only see information for yesterday
after noon, not before noon. I have actually watched this happen; the
first statement that writes to the file after noon truncates everything
already in the file.
My version: 1.2.0.30714. I'm on Windows, MS.NET Framework v1.1.4322 using
Visual Studio 2003 and linking to the pre-built DLL from SourceForge.
Sample of my App.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<log4net>
<appender name="FileAppender"
type="log4net.Appender.RollingFileAppender">
<file value="//server/share$/log/log-" />
<appendToFile value="true" />
<datePattern value="yyyy-MM-dd.\\tx\\t" />
<rollingStyle value="Date" />
<staticLogFileName value="false" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%-5p %-20t %d %c line %L%n
%m%n" />
</layout>
</appender>
<root>
<level value="INFO" />
<appender-ref ref="FileAppender" />
</root>
</log4net>