Expand description
rat_logger - 高性能日志库
基于 zerg_creep 重新设计的高性能日志库,支持多处理器、异步IO和批处理优化
Re-exports§
pub use core::Logger;pub use core::LoggerBuilder;pub use core::parse_log_level_from_env;pub use core::try_init_from_env;pub use core::is_initialized;pub use core::set_max_level;pub use handler::composite::CompositeHandler;pub use handler::term::TermProcessor;pub use handler::file::FileProcessor;pub use handler::udp::UdpProcessor;pub use config::Level;pub use config::LevelFilter;pub use config::FileConfig;pub use config::NetworkConfig;pub use config::FormatConfig;pub use config::LevelStyle;pub use config::LevelTemplates;pub use config::ColorConfig;
Modules§
- config
- 配置模块
- core
- 日志核心模块 - 完全异步的生产者消费者架构
- handler
- 日志处理器模块
- producer_
consumer - 广播式生产者消费者模式实现 主线程广播消息给所有处理器,每个处理器自己决定是否处理
- udp_
helper - UDP封包解包辅助工具
Macros§
- debug
- emergency
- 紧急日志宏 - 无视所有限制立即输出,适用于启动日志和关键错误
- error
- flush_
logs - 强制刷新全局日志器 - 立即输出所有缓冲的日志
- info
- startup_
log - 启动日志宏 - 专门用于程序启动时的配置信息输出
- trace
- warn
Structs§
- FmtInitializer
- 快速初始化器 - 类似 tracing_subscriber::fmt()
Functions§
- fmt
- 创建格式化初始化器 - 类似 tracing_subscriber::fmt()
- init
Deprecated - init_
with_ level Deprecated