This project is read-only.
1
Vote

Logging file rollover bug

description

When the log file is set to roll over and the initial log grows larger than the _maxFileSizeInMegs value, each subsequent message is written to an individual file with -partX in the filename. It ends up creating hundred of logs with a single log message in each log. It appears that the code is still checking the original file size on each log attempt, rather than checking the size of the newly created log file. The FlushCheck() method in the LogFile class should be checking _filepathUnique rather than _filepath.

Current:
if (_rollFile && FileUtils.GetSizeInMegs(_filepath) > _maxFileSizeInMegs)

Should be:
if (_rollFile && FileUtils.GetSizeInMegs(_filepathUnique) > _maxFileSizeInMegs)

comments