#[no_mangle]
pub unsafe extern "C" fn logging_init(
trader_id: TraderId,
instance_id: UUID4,
level_stdout: LogLevel,
level_file: LogLevel,
directory_ptr: *const c_char,
file_name_ptr: *const c_char,
file_format_ptr: *const c_char,
component_levels_ptr: *const c_char,
is_colored: u8,
is_bypassed: u8,
print_config: u8,
) -> LogGuard_API
Expand description
Initializes 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.
- Assume
directory_ptr
is either NULL or a valid C string pointer. - Assume
file_name_ptr
is either NULL or a valid C string pointer. - Assume
file_format_ptr
is either NULL or a valid C string pointer. - Assume
component_level_ptr
is either NULL or a valid C string pointer.