Skip to content

refactor: rolling file appender as one single solution#159

Merged
tisonkun merged 13 commits into
mainfrom
rolling-file-fixes
Sep 7, 2025
Merged

refactor: rolling file appender as one single solution#159
tisonkun merged 13 commits into
mainfrom
rolling-file-fixes

Conversation

@tisonkun
Copy link
Copy Markdown
Contributor

@tisonkun tisonkun commented Sep 7, 2025

The rotate strategy is:

from:
app.log
app.1.log
app.2.log

to:
app.log
app.1.log - old app.log
app.2.log - old app.1.log
- old app.2.log deleted

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun tisonkun enabled auto-merge (squash) September 7, 2025 11:25
@tisonkun tisonkun merged commit f85e7d4 into main Sep 7, 2025
9 checks passed
@tisonkun tisonkun deleted the rolling-file-fixes branch September 7, 2025 11:29
Copy link
Copy Markdown

@Mota-Link Mota-Link left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nine9ths
Copy link
Copy Markdown
Contributor

Sorry, a little late to the party, should it just be called FileAppender now that it handles the rolling and static file cases?

@tisonkun
Copy link
Copy Markdown
Contributor Author

called FileAppender

Sounds reasonable. I may consider rename it as append::File, or if you have time, welcome to do the rename :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rolling file appender overgrows x.log.0 on restart when max_file_size is set Log file name style

3 participants