From: David Mulder Date: Thu, 22 Aug 2024 20:24:31 +0000 (-0600) Subject: Only set the debug logfile if not stdout X-Git-Tag: tdb-1.4.13~887 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c33fb4bfd5f6ec630a141616993543d0242c08e6;p=thirdparty%2Fsamba.git Only set the debug logfile if not stdout Signed-off-by: David Mulder Reviewed-by: Alexander Bokovoy --- diff --git a/rust/himmelblaud/src/main.rs b/rust/himmelblaud/src/main.rs index 2ac065841f3..3f1a5482876 100644 --- a/rust/himmelblaud/src/main.rs +++ b/rust/himmelblaud/src/main.rs @@ -119,13 +119,15 @@ async fn main() -> ExitCode { // on what is specified on the command line. match clap_args.get_flag("debug-stdout") { true => setup_logging(env!("CARGO_PKG_NAME"), DEBUG_STDOUT), - false => setup_logging(env!("CARGO_PKG_NAME"), DEBUG_FILE), - } - match lp.logfile() { - Ok(Some(logfile)) => debug_set_logfile(&logfile), - _ => { - eprintln!("Failed to determine logfile name"); - return ExitCode::FAILURE; + false => { + setup_logging(env!("CARGO_PKG_NAME"), DEBUG_FILE); + match lp.logfile() { + Ok(Some(logfile)) => debug_set_logfile(&logfile), + _ => { + eprintln!("Failed to determine logfile name"); + return ExitCode::FAILURE; + } + } } }