Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. tklog

tklog

Apache-2.0Rustv0.3.0

A high-performance structured logging library for Rust with file rotation, compression, and async support.

Visit WebsiteGitHubGitHub
126 stars10 forks0 contributors

What is tklog?

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.

Target Audience

Rust developers building applications that require reliable, production-ready logging with features like log file management, rotation, and compression.

Value Proposition

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.

Overview

lightweight and efficient rust structured log library with support for log levels, file segmentation, compressed archiving

Use Cases

Best For

  • Rust backend services needing structured log files
  • Applications requiring automatic log file rotation and archiving
  • Projects that must compress old log files to save disk space
  • Systems where different modules need independent logging configurations
  • High-performance applications that benefit from asynchronous logging
  • Teams wanting a drop-in replacement for the standard Rust log crate with enhanced features

Not Ideal For

  • Projects needing only basic console logging without file management features
  • Systems requiring deep integration with distributed tracing or observability platforms like Jaeger or Prometheus
  • Teams already standardized on the Rust tracing ecosystem for structured logging and spans
  • Applications where dependency minimalism is critical and advanced logging features are unnecessary

Pros & Cons

Pros

Comprehensive File Management

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.

Granular Module Control

Allows independent log parameter settings for specific modules or submodules via set_mod_option, enabling fine-tuned logging in complex applications.

High Performance

Benchmark tests in the README show average response times around 2.4 microseconds, ensuring low latency for both sync and async logging operations.

Standard log Crate Compatibility

Implements the Rust log crate API with uselog(), providing a drop-in replacement that eases migration from other logging libraries.

Cons

Pre-1.0 Stability Risks

As a 0.x version library, future updates may introduce breaking API changes, which could disrupt production deployments reliant on current features.

Configuration Overhead

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.

Limited Ecosystem Integration

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.

Frequently Asked Questions

Quick Stats

Stars126
Forks10
Contributors0
Open Issues15
Last commit1 year ago
CreatedSince 2024

Tags

#logging-library#log#log-compression#logging#async-logging#logger#structured-logging#log-management#rust-library#rust#file-rotation#performance

Built With

R
Rust

Links & Resources

Website

Included in

Rust56.6k
Auto-fetched 9 hours ago

Related Projects

tracingtracing

Application level tracing for Rust.

Stars6,864
Forks927
Last commit3 months ago
loglog

Logging implementation for Rust

Stars2,545
Forks288
Last commit17 days ago
slogslog

Structured, contextual, extensible, composable logging for Rust

Stars1,708
Forks98
Last commit3 months ago
log4rslog4rs

A highly configurable logging framework for Rust

Stars1,135
Forks167
Last commit9 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub