Expand description
Logging module for netoptim-rs.
This module provides optional logging capabilities via env_logger.
It is only available when the std feature is enabled.
§Usage
ⓘ
use netoptim_rs::logging::init_logger;
init_logger();
log::info!("Application started");Or with custom filter:
ⓘ
use netoptim_rs::logging::init_logger_with_filter;
init_logger_with_filter("debug");
log::debug!("Debug message");§Environment Variables
RUST_LOG: Controls log level (debug, info, warn, error)RUST_LOG_STYLE: Controls colored output
Example:
RUST_LOG=debug cargo run --features stdFunctions§
- init_
logger - Initialize the logger with the default filter.
- init_
logger_ with_ filter - Initialize the logger with a custom filter string.
- is_
logger_ initialized - Check if the logger has been initialized.
- try_
init_ logger - Try to initialize the logger without panicking.
- try_
init_ logger_ with_ filter - Try to initialize the logger with a custom filter without panicking.