- 📌 Overview
- 🚀 Features
- 📂 Project Structure
- 🛠️ Installation & Compilation
- 📓 systemd / journald Integration
- 📜 License
LCBLog is a flexible and thread-safe C++ logging library designed primarily for long-running daemon-style applications. It provides:
- Multiple log levels (
DEBUG,INFO,WARN,ERROR,FATAL) - Thread safety using
std::mutex - Non-blocking logging using internal worker threads and queues
- Optional timestamps
- Multi-line message handling
- Pluggable backends:
- Standard output/error streams
- Native systemd journald integration
- [✔] Log level filtering
- [✔] Thread-safe, async logging
- [✔] stdout/stderr or journald backends
- [✔] Explicit journald priority mapping
- [✔] One-time startup backend banner
📁 LCBLog
├─ README.md
├─ LICENSE
└─ src
├─ lcblog.hpp
├─ lcblog.cpp
├─ lcblog.tpp
├─ main.cpp
└─ Makefile
- C++20
- make
- Optional: libsystemd-dev
makeInstall systemd headers:
sudo apt install libsystemd-devEnable journald:
logger.enableJournald(true);
logger.setJournaldIdentifier("wsprrypi");| LCBLog | journald |
|---|---|
| DEBUG | 7 |
| INFO | 6 |
| WARN | 4 |
| ERROR | 3 |
| FATAL | 2 |
MIT License.