Skip to content

Latest commit

 

History

History
executable file
·
48 lines (40 loc) · 1.15 KB

README.md

File metadata and controls

executable file
·
48 lines (40 loc) · 1.15 KB

LogRush

A log-rush logging client for c++

Install

Todo CMake install Todo conan install

Usage

include in CMake

add the following lines to yout CMakeLists.txt

find_package(logrush)
⋮
# in your target_link_libraries
target_link_libraries(<TARGET> logrush::logrush) 

creating an LogRushClient

#include <logrush/logrush.h>
⋮
logrush::LogRushClient client = logrush::LogRushClient("<server address>");

register log stream:

// Batch Stream
auto stream = client.register_stream("<Stream Name>", 5 /* Batch size */, "" /* id */, ""/* key */); 

// Basic Stream
auto stream = client.register_stream("<Stream Name>", "" /* id */, ""/* key */);

id and key should be empty strings except you want to reuse the stream

log

stream.log("<message>");

unregister log stream

client.unregister(stream);

Examples

in the examples directory you can find two simple programms which use the logrush lib.

Spdlog

this repository contains two logging sinks for the spdlog library one for basic logging and one for batched logging.