Skip to content

Rolling files ignore initial file size #34

@nomiddlename

Description

@nomiddlename

See log4js-node/log4js-node#842 - when previous log files exist, their size is not taken into account for log rolling. Instead the file size counter starts from zero on stream opening.

Actual behaviour: something.log is 77k, max log size is 100k. When the app starts, something.log will be moved to something.log.1 when it reaches a size of 177k instead of 100k. Additionally, if there was a backup file (something.log.1) then that will be overwritten instead of being moved to something.log.2.

Expected behaviour: something.log should be moved to something.log.1 when it reaches a size of 100k, regardless of initial size. something.log.1, if it already exists, should be moved to something.log.2.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions