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

Rotate is already implemented, but not documented. #86

Open
leonardorame opened this issue Jun 12, 2024 · 0 comments
Open

Rotate is already implemented, but not documented. #86

leonardorame opened this issue Jun 12, 2024 · 0 comments

Comments

@leonardorame
Copy link

Hi, just to mention that rotation facility is already implemented in 0.0.14, but not documented.

The configuration should be like:

config :logger, :debug,
  path: "/path/to/debug.log",
  level: :debug,
  rotate: %{max_bytes: 10400, keep: 5}

This creates log files with a maximum size of 10400 bytes and only keep 5 files, like this:

debug.log
debug.log.1
debug.log.2
debug.log.3
debug.log.4

And don't forget to replace {:logger_file_backend, "~> 0.0.10"}, to {:logger_file_backend, "~> 0.0.14"},.

That's it.

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