HubLensCross-platformTencent/BqLog
Tencent

BqLog

Backend#Logging#C++#Performance#Cross-platform
View on GitHub
533

// summary

BqLog is a lightweight, industrial-grade logging system designed to deliver high performance across diverse platforms including mobile, desktop, and game engines. It supports multiple programming languages and provides advanced features like real-time compressed logging and hybrid asymmetric encryption. The system is engineered for high-concurrency scenarios, ensuring minimal memory usage and reliable crash recovery for demanding applications.

// technical analysis

BqLog is a high-performance, industrial-grade logging system designed to address the 'impossible triangle' of logging: ease of troubleshooting, high performance, and minimal storage footprint. Its architecture utilizes a core engine accessible via language-specific wrappers, allowing multiple languages within the same process to share a unified logging instance. By prioritizing low memory overhead and high-compression binary formats, the project provides a robust solution for high-concurrency environments, including mobile platforms and game engines like Unreal and Unity.

// key highlights

01
Delivers superior performance compared to industry standards like spdlog, glog, and Log4j2, with compressed mode being significantly faster.
02
Maintains an extremely low memory footprint, typically consuming only 1-4 MB even under high-concurrency, multi-threaded workloads.
03
Features a high-compression binary log format that reduces storage requirements by approximately 6.7x compared to plain text.
04
Supports optional, high-performance hybrid encryption (asymmetric and symmetric) to protect sensitive log content with near-zero overhead.
05
Provides a unified cross-language logging interface for C++, Java, C#, Kotlin, TypeScript, JavaScript, and Python.
06
Includes specialized support for game engines, offering Unreal Engine Blueprint integration and seamless redirection to game console outputs.

// use cases

01
High-performance asynchronous logging for server and client applications
02
Cross-language unified logging for C++, Java, C#, TypeScript, and Python
03
Secure, space-efficient log storage using hybrid asymmetric encryption and compression

// getting started

To begin, download the appropriate platform-specific package from the GitHub Releases page. Integrate the library using CMake or the provided language-specific integration guides, then initialize a log instance by passing a configuration string to the BqLog engine. You can then immediately start logging messages using the standard info or debug methods provided by your language's wrapper.