diff options
Diffstat (limited to 'tvix/store/src/bin/tvix-store.rs')
-rw-r--r-- | tvix/store/src/bin/tvix-store.rs | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs index ca79378eb4fc..f241a80bf575 100644 --- a/tvix/store/src/bin/tvix-store.rs +++ b/tvix/store/src/bin/tvix-store.rs @@ -162,24 +162,20 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let level = cli.log_level.unwrap_or(Level::INFO); let subscriber = tracing_subscriber::registry() - .with(if cli.json { - Some( + .with( + cli.json.then_some( tracing_subscriber::fmt::Layer::new() .with_writer(std::io::stderr.with_max_level(level)) .json(), - ) - } else { - None - }) - .with(if !cli.json { - Some( + ), + ) + .with( + (!cli.json).then_some( tracing_subscriber::fmt::Layer::new() .with_writer(std::io::stderr.with_max_level(level)) .pretty(), - ) - } else { - None - }); + ), + ); tracing::subscriber::set_global_default(subscriber).expect("Unable to set global subscriber"); |