A high-performance structured logging library for Rust with file rotation, compression, and async support.
tklog is a high-performance structured logging library for Rust. It provides flexible log output, file rotation by time or size, compression of archived logs, and support for both synchronous and asynchronous logging. It solves the need for a robust, configurable logging solution in Rust applications that goes beyond basic console output.
Rust developers building applications that require reliable, production-ready logging with features like log file management, rotation, and compression.
Developers choose tklog for its comprehensive feature set, including hybrid file rotation, module-specific configurations, and compatibility with the standard Rust log crate, all while maintaining high performance and a simple API.
lightweight and efficient rust structured log library with support for log levels, file segmentation, compressed archiving
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports hybrid log rotation by time, size, or both with automatic compression, as shown in examples like set_cutmode_by_mixed, making it robust for production log archival.
Allows independent log parameter settings for specific modules or submodules via set_mod_option, enabling fine-tuned logging in complex applications.
Benchmark tests in the README show average response times around 2.4 microseconds, ensuring low latency for both sync and async logging operations.
Implements the Rust log crate API with uselog(), providing a drop-in replacement that eases migration from other logging libraries.
As a 0.x version library, future updates may introduce breaking API changes, which could disrupt production deployments reliant on current features.
The extensive options for formatting, rotation, and handlers—like set_cutmode_by_time and set_attr_format—create a steep learning curve for simple use cases, as evidenced by the lengthy README examples.
Compared to established alternatives like tracing or env_logger, tklog has a smaller community, which may result in fewer third-party tools, plugins, or troubleshooting resources.