Simple and lightweight logger for c++

Clone this repo:

Branches

  1. 22d1286 Update README.md by Vladimir Korotenko · 10 years ago master
  2. 2f8be00 Update README.md by Vladimir Korotenko · 10 years ago
  3. 635835a Remove windows specific header. by vkorotenko · 10 years ago
  4. ed77f14 Initial release by vkorotenko · 10 years ago
  5. d4d4278 Update .gitignore by Vladimir Korotenko · 10 years ago

Klog

KLog - small, fast and easy-to-use data logger designed to be embedded in C ++ projects. For implementation see main.cpp

Usage

  • add to you project file CKlog.h
  • add LOG(LEVEL, FORMATSTRING, ARGS)
  • FORMATSTRING - it's a string in printf style
  • ARGS - any argument

Sample usage

#include "Klog.h"
int main(int argc, char** argv){
  
	LOG(255,"test %s", "hello" );
	LOG(255,"test");

}

Config file sintaxis

# comment string
# config file name is a klog.cfg, it must be in the same directory as the application
level = 255 # log level
filename = klog_11.log # path to log file