diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index 3c6339c03e..f55b91d58c 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -278,7 +278,7 @@ pub fn get_config( } if clap_utils::parse_optional::(cli_args, "eth1-cache-follow-distance")?.is_some() { - warn!("The eth1-purge-cache flag is deprecated"); + warn!("The eth1-cache-follow-distance flag is deprecated"); } // `--execution-endpoint` is required now. diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index bbd8f764e7..10168d026f 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -126,6 +126,16 @@ fn main() { .global(true) .display_order(0), ) + .arg( + Arg::new("logfile") + .long("logfile") + .value_name("PATH") + .help("DEPRECATED") + .action(ArgAction::Set) + .global(true) + .hide(true) + .display_order(0) + ) .arg( Arg::new("logfile-dir") .long("logfile-dir") @@ -701,6 +711,11 @@ fn run( // Allow Prometheus access to the version and commit of the Lighthouse build. metrics::expose_lighthouse_version(); + // DEPRECATED: can be removed in v7.2.0/v8.0.0. + if clap_utils::parse_optional::(matches, "logfile")?.is_some() { + warn!("The --logfile flag is deprecated and replaced by --logfile-dir"); + } + #[cfg(all(feature = "modern", target_arch = "x86_64"))] if !std::is_x86_feature_detected!("adx") { tracing::warn!( diff --git a/lighthouse/tests/beacon_node.rs b/lighthouse/tests/beacon_node.rs index 7a5a83cb29..884e5eddeb 100644 --- a/lighthouse/tests/beacon_node.rs +++ b/lighthouse/tests/beacon_node.rs @@ -2476,6 +2476,13 @@ fn logfile_format_flag() { ) }); } +// DEPRECATED but should not crash. +#[test] +fn deprecated_logfile() { + CommandLineTest::new() + .flag("logfile", Some("test.txt")) + .run_with_zero_port(); +} // DEPRECATED but should not crash. #[test]