Skip to main content

init_logging

Function init_logging 

Source
pub fn init_logging(config: LoggingConfig) -> Result<LoggingGuard>
Expand description

Initialize the multi-layer tracing subscriber.

Sets up:

  1. Operational layer — stdout with EnvFilter, runtime-reloadable
  2. HFT layer (optional) — non-blocking rolling file appender filtered to janus::hft target only

Returns a LoggingGuard that must be held alive until shutdown.

§Errors

Returns an error if the HFT log directory cannot be created or if the tracing subscriber fails to initialize.