nautilus_common::logging

Function init_logging

source
pub fn init_logging(
    trader_id: TraderId,
    instance_id: UUID4,
    config: LoggerConfig,
    file_config: FileWriterConfig,
) -> LogGuard
Expand description

Initialize logging.

Logging should be used for Python and sync Rust logic which is most of the components in the main nautilus_trader package. Logging can be configured to filter components and write up to a specific level only by passing a configuration using the NAUTILUS_LOG environment variable.

ยงSafety

Should only be called once during an applications run, ideally at the beginning of the run.