Skip to content

Increase default logfile parameters#354

Merged
jking-aus merged 2 commits intosigp:release-v0.1.0from
dknopik:increase-default-logfile
Jun 3, 2025
Merged

Increase default logfile parameters#354
jking-aus merged 2 commits intosigp:release-v0.1.0from
dknopik:increase-default-logfile

Conversation

@dknopik
Copy link
Member

@dknopik dknopik commented Jun 2, 2025

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.

@dknopik dknopik added the v0.1.0 First Testnet-only release label Jun 2, 2025
@diegomrsantos diegomrsantos requested a review from Copilot June 2, 2025 12:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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` |
Copy link

Copilot AI Jun 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a note or warning in the documentation about the increased potential disk usage when logfile compression remains disabled.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the compression disabled by default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100 might be too much

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with these parameters, the logs will survive over the weekend, allowing the admin to rescue interesting parts on monday

@jking-aus jking-aus merged commit 5c41566 into sigp:release-v0.1.0 Jun 3, 2025
13 checks passed
@dknopik dknopik deleted the increase-default-logfile branch June 20, 2025 13:03
diegomrsantos pushed a commit to diegomrsantos/anchor that referenced this pull request Sep 17, 2025
jking-aus pushed a commit to jking-aus/anchor that referenced this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v0.1.0 First Testnet-only release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants