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
/// Main configuration structure for log file output.
///
/// Controls where logs are stored and their maximum size limits.
/// Use FileLogger::new() to create an instance with custom settings.
#[derive(Clone)]
pub struct FileLogger {
    /// The directory path where log files will be stored.
    pub(super) path: String,
    /// The maximum allowed size (in bytes) for individual log files.
    /// Set to 0 to disable logging.
    pub(super) limit_file_size: usize,
    /// Subdirectory name for trace logs.
    pub(super) trace_dir: String,
    /// Subdirectory name for debug logs.
    pub(super) debug_dir: String,
    /// Subdirectory name for info logs.
    pub(super) info_dir: String,
    /// Subdirectory name for warn logs.
    pub(super) warn_dir: String,
    /// Subdirectory name for error logs.
    pub(super) error_dir: String,
}