pub fn init_logging(
trader_id: TraderId,
instance_id: UUID4,
config: LoggerConfig,
file_config: FileWriterConfig,
) -> Result<LogGuard>
Expand description
Initialize logging.
Logging should be used for Python and sync Rust logic which is most of
the components in the posei_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. Initialize logging.
Logging should be used for Python and sync Rust logic which is most of
the components in the posei_trader
package.
Logging can be configured via the NAUTILUS_LOG
environment variable.
§Errors
Returns an error if the logging subsystem fails to initialize.