Skip to content

Level based and thread-safe logger implementation in C++

Notifications You must be signed in to change notification settings

tmargary/SimpleLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleLogger

Level based and thread-safe logger implementation in C++

Installation

  1. git clone https://github.com/tmargary/SimpleLogger
  2. cd SimpleLogger
  3. cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
  4. cmake --build ./build
  5. ./build/tests/LoggerTest

Usage

std::string freq = "day";
std::string path = get_cwd();
std::string config_path = path + "/config.json";
LogLevel level = get_level(config_path);

Logger logger(path, freq, level);
logger.log(DEBUG, "Debug message");

About

Level based and thread-safe logger implementation in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published