Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Prev Previous commit
Next Next commit
Add more comments about log-age option
  • Loading branch information
Scott Piriou committed Jul 6, 2020
commit 5417943b26ee38273e05efe4d7f19d47fa6a5a26
3 changes: 2 additions & 1 deletion client/cli/src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ pub struct LogRotationOpt {
#[structopt(long, parse(from_os_str))]
log_directory: Option<PathBuf>,

/// Rotate the log file when it has become older than the specified age.
/// Rotate the log file when the local clock has started a new day/hour/minute/second
/// since the current file has been created.
#[structopt(long,
conflicts_with("log-size"),
possible_values(&["day", "hour", "minute", "second"]),
Copy link
Contributor

@tomaka tomaka Jul 6, 2020

Choose a reason for hiding this comment

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

So you'd for example pass --log-age minute? I don't understand this.

Copy link
Contributor Author

@pscott pscott Jul 6, 2020

Choose a reason for hiding this comment

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

Yes, it's inspired by the Age enum from flexi_logger :) I could remove minute / second or even rename them if you think we could use a better name ! :)

Copy link
Contributor

Choose a reason for hiding this comment

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

The documentation of the Age enum that you linked does make sense because it explains what the values mean.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

5417943 :)

Expand Down