hyperlane-log 4.0.6

A Rust logging library that supports both asynchronous and synchronous logging. It provides multiple log levels, such as error, info, and debug. Users can define custom log handling methods and configure log file paths. The library supports log rotation, automatically creating a new log file when the current file reaches the specified size limit. It allows flexible logging configurations, making it suitable for both high-performance asynchronous applications and traditional synchronous logging scenarios. The asynchronous mode utilizes Tokio's async channels for efficient log buffering, while the synchronous mode writes logs directly to the file system.
Documentation
/// Default directory path for storing log files.
pub const DEFAULT_LOG_DIR: &str = "./logs";

/// File extension for log files.
pub const LOG_EXTENSION: &str = "log";

/// Default starting index number for log files.
pub const DEFAULT_LOG_FILE_START_IDX: usize = 1;

/// Default maximum size limit for log files in bytes.
pub const DEFAULT_LOG_FILE_SIZE: usize = 1_024_000_000;

/// Special value indicating no size limit for log files.
pub const DISABLE_LOG_FILE_SIZE: usize = 0;

/// Root path symbol.
pub(crate) const ROOT_PATH: &str = "/";

/// Dot symbol.
pub(crate) const POINT: &str = ".";

/// Line break symbol.
pub(crate) const BR: &str = "\n";

/// Subdirectory name for trace logs.
pub const TRACE_DIR: &str = "trace";

/// Subdirectory name for debug logs.
pub const DEBUG_DIR: &str = "debug";

/// Subdirectory name for info logs.
pub const INFO_DIR: &str = "info";

/// Subdirectory name for warn logs.
pub const WARN_DIR: &str = "warn";

/// Subdirectory name for error logs.
pub const ERROR_DIR: &str = "error";