diff --git a/nomos-services/log/src/lib.rs b/nomos-services/log/src/lib.rs index c407f46f..2f0478ba 100644 --- a/nomos-services/log/src/lib.rs +++ b/nomos-services/log/src/lib.rs @@ -69,6 +69,8 @@ pub enum LoggerBackend { Stderr, #[serde(skip)] Writer(SharedWriter), + // do not collect logs + None, } #[derive(Clone, Debug, Serialize, Deserialize)] @@ -159,6 +161,12 @@ impl ServiceCore for Logger { LoggerBackend::Stdout => tracing_appender::non_blocking(std::io::stdout()), LoggerBackend::Stderr => tracing_appender::non_blocking(std::io::stderr()), LoggerBackend::Writer(writer) => tracing_appender::non_blocking(writer), + LoggerBackend::None => { + return Ok(Self { + service_state, + worker_guard: None, + }) + } }; let layer = tracing_subscriber::fmt::Layer::new()