Crate hyperlane_log

Source
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§

LogFuncTrait

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.
ArcLogFunc
Shared reference to a log function trait object.
ListLog
A list of named log functions.
LogArcLock
Thread-safe shared reference to a log instance.
LogFunc
Trait object for log functions.
LogListArcLock
Thread-safe shared reference to a list of log functions.