Skip to content

Commit

Permalink
suppress output (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
divagant-martian authored Dec 18, 2023
1 parent e256953 commit 0d73f76
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lighthouse/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,15 @@ fn main() {
}
};

let turn_on_terminal_logs = matches.is_present("env_log");

if let Err(e) = tracing_subscriber::fmt()
.with_env_filter(filter_layer)
.with_writer(move || {
tracing_subscriber::fmt::writer::OptionalWriter::<std::io::Stdout>::from(
turn_on_terminal_logs.then(std::io::stdout),
)
})
.finish()
.with(logging::MetricsLayer)
.try_init()
Expand Down

0 comments on commit 0d73f76

Please sign in to comment.