]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Only set the debug logfile if not stdout
authorDavid Mulder <dmulder@samba.org>
Thu, 22 Aug 2024 20:24:31 +0000 (14:24 -0600)
committerDavid Mulder <dmulder@samba.org>
Wed, 23 Oct 2024 14:21:34 +0000 (14:21 +0000)
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
rust/himmelblaud/src/main.rs

index 2ac065841f37c8de5de63d02ef02bfd1871df23a..3f1a5482876610a4265cd71d7fb081a3ae821cd0 100644 (file)
@@ -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;
+                    }
+                }
             }
         }