Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bin/reth/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use reth_node_builder::{NodeBuilder, WithLaunchContext};
use reth_primitives::ChainSpec;
use reth_tracing::FileWorkerGuard;
use std::{ffi::OsString, fmt, future::Future, sync::Arc};
use tracing::info;

/// Re-export of the `reth_node_core` types specifically in the `cli` module.
///
Expand Down Expand Up @@ -139,6 +140,7 @@ impl<Ext: clap::Args + fmt::Debug> Cli<Ext> {
self.logs.log_file_directory.join(self.chain.chain.to_string());

let _guard = self.init_tracing()?;
info!(target: "reth::cli", "Initialized tracing, debug log directory: {}", self.logs.log_file_directory);

let runner = CliRunner::default();
match self.command {
Expand Down
2 changes: 2 additions & 0 deletions crates/node-core/src/args/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ impl LogArgs {
}

/// Initializes tracing with the configured options from cli args.
///
/// Returns the file worker guard, and the file name, if a file worker was configured.
pub fn init_tracing(&self) -> eyre::Result<Option<FileWorkerGuard>> {
let mut tracer = RethTracer::new();

Expand Down