Expand description
hyperlane-log
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.
Structs§
- Log
- Configuration for log file output.
Constants§
- DEBUG_
DIR - DEFAULT_
LOG_ DIR - DEFAULT_
LOG_ FILE_ SIZE - DEFAULT_
LOG_ FILE_ START_ IDX - DISABLE_
LOG_ FILE_ SIZE - ERROR_
DIR - INFO_
DIR - LOG_
EXTENSION
Traits§
Functions§
- common_
log - Formats log data with timestamp for each line.
- log_
handler - Handles log data formatting.
Type Aliases§
- ArcLog
- Shared reference to a log instance.
- ArcLog
Func - Shared reference to a log function trait object.
- ListLog
- A list of named log functions.
- LogArc
Lock - Thread-safe shared reference to a log instance.
- LogFunc
- Trait object for log functions.
- LogList
ArcLock - Thread-safe shared reference to a list of log functions.