Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Does not work when maxBackupIndex is set to 0 #609

@lougon

Description

@lougon
  • version: all
    DailyRollingFileAppender::rollover(bool alreadyLocked)

The method did not determine that maxBackupIndex<=0

When setting maxBackupIndex to 0, the program always displays two files, "log.2009-11-07" and "log.2009-11-07.1". The correct one should only appear as "log.2009-11-07"

You can refer to the
RollingFileAppender:: roller (bool alreadyLocked)

//If maxBackups<=0, then there is no file renaming to be done
If (maxBackupIndex>0)
{...} Add a judgment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions