Trait reth_tracing::Tracer

source ·
pub trait Tracer {
    // Required method
    fn init(self) -> Result<Option<WorkerGuard>>;
}
Expand description

Trait defining a general interface for logging configuration.

The Tracer trait provides a standardized way to initialize logging configurations in an application. Implementations of this trait can specify different logging setups, such as standard output logging, file logging, journald logging, or custom logging configurations tailored for specific environments (like testing).

Required Methods§

source

fn init(self) -> Result<Option<WorkerGuard>>

Initialize the logging configuration.

§Returns

An eyre::Result which is Ok with an optional WorkerGuard if a file layer is used, or an Err in case of an error during initialization.

Implementors§