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

how to use policy trigger by age, and the log append with {date} #394

Open
blizzardzheng opened this issue Sep 17, 2024 · 1 comment
Open

Comments

@blizzardzheng
Copy link

blizzardzheng commented Sep 17, 2024

i want to use log rolling by date, record 7days, is there any instructions?

expected

rust_file:
    kind: rolling_file
    path: "logs/rust/{date}.log"
    encoder:
      pattern: "{d(%Y-%m-%d %H:%M:%S)} [{l}] {m}{n}"
    policy:
      compound:
        trigger:
          # 按天滚动
          age: 1d
        roller:
          # 保留最近7天的日志
          delete: {}
@bconn98
Copy link
Collaborator

bconn98 commented Sep 17, 2024

Please refer to the configuration section of our documentation on docs.rs

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