Title: Nachricht
Hi,
 
I have the same problem!!!
In my DEBUG-Log you can see why the files could not be rolled.
 
Thanks
Dirk
-----Ursprüngliche Nachricht-----
Von: Saurabh Dani [mailto:[EMAIL PROTECTED]
Gesendet: Sonntag, 7. August 2005 23:30
An: [email protected]
Betreff: Keeping old log files in RollingAppender

I have following configuration for RollingFIleAppender, but it does not save my old logs. Every night the log file is overwritten. Can someon epoint to me that what needs to be changed to keep the old logs.

<log4net>

<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">

<file value="Logs\l4net.log" />

<appendToFile value="true" />

<rollingStyle value="Date" />

<datePattern value="yyyyMMdd" />

<lockingModel type="log4net.Appender.RollingFileAppender+MinimalLock" />

<layout type="log4net.Layout.PatternLayout">

<conversionPattern value="%date|[%thread]|%-5level|%logger|%l|[%property{NDC}]|- %message%newline" />

</layout>

</appender>

<root>

<level value="INFO" />

<level value="DEBUG" />

<appender-ref ref="RollingLogFileAppender" />

</root>

</log4net>



Thanks
Saurabh
--- Begin Message ---
Title: RollingFileAppender does sometimes not work

Hi,

I have the latest version of log4net from cvs, but the RollingFileAppender
does sometimes not roll the logfiles.
Here is the debug-log:
log4net: RollingFileAppender: Moving
[D:\Projekte\CarConfigurators\CC5\LogFiles\cc5-trace.txt] ->
[..\\LogFiles\\cc5-trace.txt.20050728]
log4net:ERROR [RollingFileAppender] Exception while rolling file
[D:\Projekte\CarConfigurators\CC5\LogFiles\cc5-trace.txt] ->
[..\\LogFiles\\cc5-trace.txt.20050728]
System.IO.DirectoryNotFoundException: Ein Teil des Pfades
..\\LogFiles\\cc5-trace.txt.20050728 konnte nicht gefunden werden.
   at System.IO.__Error.WinIOError(Int32 errorCode, String str)
   at System.IO.File.Move(String sourceFileName, String destFileName)
   at log4net.Appender.RollingFileAppender.RollFile(String fromFile, String
toFile)
log4net: FileAppender: Opening file for writing
[D:\Projekte\CarConfigurators\CC5\LogFiles\cc5-trace.txt] append [False]
log4net: RollingFileAppender: Moving
[D:\Projekte\CarConfigurators\CC5\LogFiles\cc5-error.txt] ->
[..\\LogFiles\\cc5-error.txt.20050728]
log4net:ERROR [RollingFileAppender] Exception while rolling file
[D:\Projekte\CarConfigurators\CC5\LogFiles\cc5-error.txt] ->
[..\\LogFiles\\cc5-error.txt.20050728]
System.IO.DirectoryNotFoundException: Ein Teil des Pfades
..\\LogFiles\\cc5-error.txt.20050728 konnte nicht gefunden werden.
   at System.IO.__Error.WinIOError(Int32 errorCode, String str)
   at System.IO.File.Move(String sourceFileName, String destFileName)
   at log4net.Appender.RollingFileAppender.RollFile(String fromFile, String
toFile)
log4net: FileAppender: Opening file for writing
[D:\Projekte\CarConfigurators\CC5\LogFiles\cc5-error.txt] append [False]
log4net: RollingFileAppender: Moving
[D:\Projekte\CarConfigurators\CC5\LogFiles\cc5-info.txt] ->
[..\\LogFiles\\cc5-info.txt.20050728]
log4net:ERROR [RollingFileAppender] Exception while rolling file
[D:\Projekte\CarConfigurators\CC5\LogFiles\cc5-info.txt] ->
[..\\LogFiles\\cc5-info.txt.20050728]
System.IO.DirectoryNotFoundException: Ein Teil des Pfades
..\\LogFiles\\cc5-info.txt.20050728 konnte nicht gefunden werden.
   at System.IO.__Error.WinIOError(Int32 errorCode, String str)
   at System.IO.File.Move(String sourceFileName, String destFileName)
   at log4net.Appender.RollingFileAppender.RollFile(String fromFile, String
toFile)
log4net: FileAppender: Opening file for writing
[D:\Projekte\CarConfigurators\CC5\LogFiles\cc5-info.txt] append [False]
log4net: Hierarchy: Shutdown called on Hierarchy
[log4net-default-repository]

I have an ASP.NET-application with .NET 1.1 SP 1

I hope you could fix the bug as soon as possible.

Thanks, Dirk


--- End Message ---

Reply via email to