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

Questions about log rolling_file #386

Closed
moom-en opened this issue Jul 31, 2024 · 3 comments
Closed

Questions about log rolling_file #386

moom-en opened this issue Jul 31, 2024 · 3 comments

Comments

@moom-en
Copy link

moom-en commented Jul 31, 2024

I want to configure it to append according to the file size, but the file name needs to contain the year, month and day. How should I configure it? eg:

appenders:
  info_file:
    kind: rolling_file
    path: "logs/info.log"
    encoder:
      pattern: "{d(%Y-%m-%d %H:%M:%S%.3f)} [{t}] {h({l})} {M} - {m}{n}"
    policy:
      trigger:
        kind: size
        limit: 10 kb
      roller:
        kind: fixed_window
        base: 1
        count: 10
        pattern: "logs/info.{%Y-%m-%d}.{}.log"
@bconn98
Copy link
Collaborator

bconn98 commented Aug 1, 2024

So we do not currently support the date as part of the log file name. It is currently being worked in #374. The size based trigger looks good.

@moom-en
Copy link
Author

moom-en commented Aug 1, 2024

So we do not currently support the date as part of the log file name. It is currently being worked in #374. The size based trigger looks good. Currently working on #374. Size based triggers look good.

Thanks for your reply, thank you

@bconn98
Copy link
Collaborator

bconn98 commented Aug 3, 2024

If nothing further, feel empowered to close this issue!

@moom-en moom-en closed this as completed Aug 5, 2024
@moom-en moom-en closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
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

2 participants