Expand description
Utility functions and helpers Shared helpers for crate consumers.
Currently a single entry point: crate::utils::setup_logger,
which installs a tracing subscriber driven by the
DERIBIT_LOG_LEVEL environment variable. The helper is re-exported
from crate::prelude so use deribit_websocket::prelude::*;
makes it available without an explicit path.
§Example
use deribit_websocket::utils::setup_logger;
// Default level is INFO; override via env var before the first call.
unsafe {
std::env::set_var("DERIBIT_LOG_LEVEL", "DEBUG");
}
setup_logger();
tracing::debug!("logger online");Functions§
- setup_
logger - Install the
tracingsubscriber used by every example and binary in the crate.