Skip to main content

Asynchronous Logger Library

A high-performance, asynchronous logging library for C++ and Python. Designed to prevent logging I/O from blocking your application's main execution flow.

Features

  • Asynchronous Design: Logging operations happen in a background thread.
  • Micro-Free C++ API: Modern C++ streaming syntax (logger::info("Sender") << "Message").
  • Python Integration: Clean, idiomatic Python API.
  • Optional File Output: Easily enable logging to a file at runtime.
  • Thread-Safe: Safe to use from multiple threads simultaneously.

C++ Usage

Basic Logging

#include "logger.h"

// Stream-like syntax
logger::info("MyClass") << "Successfully initialized model " << modelPath;
logger::err("MyClass") << "Failed to process frame " << frameId;

Enabling File Output

logger::Logger::getInstance().setFile("app.log");

Python Usage

Installation

Python

You can install the logger for the current user or system-wide.

Option 1: System-wide (Recommended for shared use)

sudo pip install ./python

Note: If you are on a modern Linux distribution (e.g., Ubuntu 23.04+) and see an "externally-managed-environment" error, use: sudo pip install ./python --break-system-packages

Option 2: User-only

pip install --user ./python

Option 3: Editable mode (For development)

pip install -e ./python

C++

The library uses CMake for building and installation.

Build and Install

mkdir build && cd build
cmake ../cpp
make
sudo make install

Linking in other projects

Once installed, you can find and link the library in your CMakeLists.txt:

find_package(Logger REQUIRED)
target_link_libraries(your_app PRIVATE Logger::logger)

Basic Usage

C++

#include "logger.h"

// Stream-like syntax
logger::info("MyClass") << "Successfully initialized model " << modelPath;

Python

import logger

# Convenience functions
logger.info("MyScript", "Starting processing...")

Documentation

Full documentation is available at docs/index.md or can be generated using MkDocs:

mkdocs serve

Release files for async-multithreaded-logger 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for async-multithreaded-logger 1.0.0
File Size Uploaded
async_multithreaded_logger-1.0.0.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for async-multithreaded-logger 1.0.0
File Interpreter ABI Platform
async_multithreaded_logger-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / async_multithreaded_logger-1.0.0.tar.gz

Download URL async_multithreaded_logger-1.0.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a4b53489d4f0b62f7754a3db65251f9e95d48d7026e30c62521ab36362c824c6
BLAKE2b-256 checksum
How to use checksums
808358f56975ae21b62b22aca40230ef4636b609d051b3dd315e96ae78f25d5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / async_multithreaded_logger-1.0.0-py3-none-any.whl

Download URL async_multithreaded_logger-1.0.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eda8078e5ff5ffc5f51c954ae00ee0d951a7af123647d7b3c9873cd342023524
BLAKE2b-256 checksum
How to use checksums
b49a419e43b6a4554f6bdb2e8537ed6085ba882e6304d555584e2d1266a9aef6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page