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

Add file rotation for logger #61

Open
Fullstop000 opened this issue Apr 5, 2020 · 0 comments
Open

Add file rotation for logger #61

Fullstop000 opened this issue Apr 5, 2020 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed P: Low Low priority

Comments

@Fullstop000
Copy link
Owner

Currently, we use a simple file to store all log messages:

wickdb/src/logger.rs

Lines 54 to 58 in 15c37cc

let file = storage
.create(generate_filename(db_path, FileType::InfoLog, 0).as_str())
.unwrap();
slog_async::Async::new(FileBasedDrain::new(file))
.build()

This could be a bad design as the log messages growing. Adding a file rotation by implementing a slog Drain might be a good solution.

@Fullstop000 Fullstop000 added enhancement New feature or request P: Low Low priority help wanted Extra attention is needed labels Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed P: Low Low priority
Projects
None yet
Development

No branches or pull requests

1 participant