Skip to content

Commit 1024822

Browse files
authored
Merge of #5228
2 parents c9702cb + 50d0f5c commit 1024822

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

common/logging/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ impl TimeLatch {
223223
}
224224
}
225225

226-
pub fn create_tracing_layer(base_tracing_log_path: PathBuf, turn_on_terminal_logs: bool) {
226+
pub fn create_tracing_layer(base_tracing_log_path: PathBuf) {
227227
let filter_layer = match tracing_subscriber::EnvFilter::try_from_default_env()
228228
.or_else(|_| tracing_subscriber::EnvFilter::try_new("warn"))
229229
{
@@ -268,11 +268,7 @@ pub fn create_tracing_layer(base_tracing_log_path: PathBuf, turn_on_terminal_log
268268

269269
if let Err(e) = tracing_subscriber::fmt()
270270
.with_env_filter(filter_layer)
271-
.with_writer(move || {
272-
tracing_subscriber::fmt::writer::OptionalWriter::<std::io::Stdout>::from(
273-
turn_on_terminal_logs.then(std::io::stdout),
274-
)
275-
})
271+
.with_writer(std::io::sink)
276272
.finish()
277273
.with(MetricsLayer)
278274
.with(custom_layer)

lighthouse/src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,9 +556,7 @@ fn run<E: EthSpec>(
556556

557557
let path = tracing_log_path.clone().unwrap();
558558

559-
let turn_on_terminal_logs = matches.is_present("env_log");
560-
561-
logging::create_tracing_layer(path, turn_on_terminal_logs);
559+
logging::create_tracing_layer(path);
562560

563561
// Allow Prometheus to export the time at which the process was started.
564562
metrics::expose_process_start_time(&log);

0 commit comments

Comments
 (0)