Increase default logfile parameters#354
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR increases the default logfile parameters to allow for larger and more numerous log files, ensuring operators have ample time to retrieve logs before deletion.
- Increase logfile maximum size from 20MB to 50MB
- Increase logfile retention from 5 files to 100 files
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| book/src/cli.md | Updated CLI documentation to reflect new default log parameters. |
| anchor/logging/src/logging.rs | Updated constant values and CLI argument defaults to support larger log files and higher retention. |
Comments suppressed due to low confidence (1)
anchor/logging/src/logging.rs:15
- Ensure that related tests are updated to reflect the new default log size and log number values to catch any issues arising from the increased thresholds.
const MAX_LOG_SIZE: u64 = 50;
| | `--logfile-debug-level <LEVEL>` | Verbosity for file logs | `debug` | | ||
| | `--logfile-max-size <SIZE>` | Maximum size of each log file in MB | `20` | | ||
| | `--logfile-max-number <NUMBER>` | Maximum number of log files to keep | `5` | | ||
| | `--logfile-max-size <SIZE>` | Maximum size of each log file in MB | `50` | |
There was a problem hiding this comment.
Consider adding a note or warning in the documentation about the increased potential disk usage when logfile compression remains disabled.
There was a problem hiding this comment.
Why is the compression disabled by default?
There was a problem hiding this comment.
good question - i did not dare changing it that close to the release
| const MAX_LOG_SIZE: u64 = 20; | ||
| const MAX_LOG_NUMBER: usize = 5; | ||
| const MAX_LOG_SIZE: u64 = 50; | ||
| const MAX_LOG_NUMBER: usize = 100; |
There was a problem hiding this comment.
with these parameters, the logs will survive over the weekend, allowing the admin to rescue interesting parts on monday
Increase logfile parameters. With current logging, the new values of 100 files with 50MB each approximately equals to 3 days worth of logs for an operator with 1000 validators. Note that logfile compression reduces the actual disk consumption by a factor of ~10.
I think we should get this into the release to ensure that people have the opportunity to copy logs before deletion if an issue occurs.