logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michel Émond <mem...@innobec.com>
Subject Rolling log file is overwritten when application is restarted
Date Tue, 12 May 2015 19:01:53 GMT

This is the first time I contribute to an open source project, your 
assistance will be much appreciated.
I read your FAQ and I believe I'm doing things in the right manner. 
Please let me know otherwise.

While using version 1.2.13, I'm experiencing the issue described in this 

In a nutshell: My app is running, rolling style is set to Composite, log 
files are piling up in the folder, all is good. Then I reset IIS, and 
restart my app. I would expect the rolling to continue on or after the 
last file. But instead, the rolling restarts at index 1 and overwrites 
the existing files.

The original bug fix addresses the issue in the 
*InitializeFromOneFile*() method.
However, the *GetWildcardPatternForFile*() method also needs the 
baseFileName to be adjusted with the datePattern so the proper files are 
I placed a file path fix in the *DetermineCurSizeRollBackups*() method, 
so it's then passed down to the two other methods and everyone gets happy.

Here's a calling stack sample:
|  +--*GetWildcardPatternForFile*()

You'll find attached to this email:
- the part of my web.config file that relates to log4net
- a patch containing my fix

Please let me know how good this fix is, and if it fits your quality 
Once we're settled, I could work on the unit tests, or let you deal with 
it at your convenience.



*Michel Émond*
Programmer Analyst

Innobec <http://www.innobec.com>

*T*  1-514-272-0979 *#240*
*T* 1-800-972-0979 *#240*
www.innobec.com <http://www.innobec.com>

View raw message