Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setting rotate by count , do not clear first file #6

Open
xieyj-apple opened this issue Apr 4, 2023 · 1 comment
Open

setting rotate by count , do not clear first file #6

xieyj-apple opened this issue Apr 4, 2023 · 1 comment

Comments

@xieyj-apple
Copy link

create logfile by day:

w, err := rotatelogs.New(
"/path/log/test.log.%Y%m%d",
rotatelogs.WithLinkName("test.log"),
rotatelogs.WithRotationCount(10),
rotatelogs.WithRotationSize(10*1024))
if err != nil {
golog.Fatal(err)
}

finally:

test.log.20230404
test.log.20230404.30
test.log.20230404.31
test.log.20230404.32
test.log.20230404.33
test.log.20230404.34

@xieyj-apple
Copy link
Author

and why do RotationCount and MaxAge can not effective together

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

No branches or pull requests

1 participant