Logging library for C++ based on C++20
- Collect logs from different processes
- Wait free queues for lower latency
- Custom logging targets and handlers
- Modern logging formatting
Clone the repository and compile the source files. You can edit the Makefile for different compilers and compile options (defaulted to clang++).
Note: C++20 is required for the logger to work so don't change CXX_STANDARD variable in CMake
$ git clone https://github.com/ykumar21/rapyd_logger
$ cd rapyd_logger
$ make
Running Rapyd is easy. Once, the source files have been compiled, run the rapyd executable as a seperate process.
$ make run
Once done, Rapyd is ready to log. Simply, register a different process with Rapyd to start logging.
Step 1: Include Rapyd header
#include "rapyd/rapyd.h"
Step 2: Register Process
Rapyd::Register("MAIN_THREAD");
Step 3: Call the Rapyd Logger
Rapyd::Info("Hello World!");
int* ptr = malloc(sizeof(int));
Rapyd::Critical("Oh no! Pointer p points to -> %p", ptr);
The logs will be shown on the Rapyd process as follows:
$ ./rapyd
MAIN_THREAD: [INFO] Hello World!
MAIN_THREAD: [CRITICAL] Oh no! Pointer p points to -> 0xDEADDEAD
MIT
Happy Hacking!