From 0c8317c6414f4f4c1f04c70c11bc76b7e70a56e2 Mon Sep 17 00:00:00 2001 From: Thanos Makatos Date: Thu, 1 Oct 2026 08:25:22 +0000 Subject: [PATCH] Print daemon starting message first Print the "daemon starting" message (almost) first, as it's weird to print other messages before that. Signed-off-by: Thanos Makatos --- src/daemon.rs | 5 ----- src/main.rs | 8 +++++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/daemon.rs b/src/daemon.rs index ccb28d8..e0921a6 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -53,11 +53,6 @@ const INOTIFY_EVENT_BUF_SIZE: usize = 32 * 1024; /// Run until SIGTERM or SIGINT. pub async fn run(cfg: Config, backends: Vec>) -> Result<(), DaemonError> { - tracing::info!( - target: "controller", - version = VERSION, - "io-thread-controller starting" - ); let per_vm_destination = if cfg.enable_per_vm_status_line { if cfg.enable_per_vm_main_log { "main log".to_string() diff --git a/src/main.rs b/src/main.rs index 73770f1..1c0aa80 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,7 +16,7 @@ use io_thread_controller::{ util::Path, }; use thiserror::Error; -use tracing::{debug, instrument}; +use tracing::{debug, info, instrument}; use tracing_subscriber::fmt::format::FmtSpan; #[derive(Error, Debug)] @@ -124,6 +124,12 @@ async fn main() -> Result<(), IoThreadControllerError> { return Err(IoThreadControllerError::NoSuchBackend(name.to_string())); } + info!( + target: "controller", + version = VERSION, + "io-thread-controller starting" + ); + let mut cfg = load_daemon_config(&cli.config)?; debug!("loaded configuration {}", &cli.config); if cli.print_status_header {