<datePattern value=".yyyyMMdd."log"" />
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
"log" string would have on that...
On 10/27/05, Simon Wallis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> This is totally weird. Every day at 12:00 noon the log files from our
> application get reset. If I check them in the morning, there are entries
> starting 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
> entries from midnight until noon are deleted.
>
> This is only happening in our recently deployed QA and production
> environments. It works fine locally. I'm also logging to a database and that
> is fine. 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.Appender.RollingFileAppender">
> <filter type="log4net.Filter.LevelRangeFilter">
> <levelMin value="WARN" />
> <levelMax value="FATAL" />
> </filter>
> <rollingStyle value="Date" />
> <datePattern value=".yyyyMMdd."log"" />
> <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 "%m"
> %P{SessionId} %P{ProfileId} %P{XmlData} %n" />
> </layout>
> </appender>
>
> Is anything wrong with it?
>
> Thanks for your help,
> Simon.
>