Skip to content

log-rush/cpp-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A log-rush logging client for c++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages