erengy / monolog

Basic logging library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Monolog

Monolog is a C++ library for basic logging purposes. It writes given records to the console, the debugger and a file.

Example

#include <monolog.hpp>

#define LOGD MONOLOG_DEBUG
#define LOGW MONOLOG_WARNING
#define LOGE MONOLOG_ERROR

int main() {
  monolog::log.set_level(monolog::Level::Debug);
  monolog::log.set_path("test.log");

  LOGD("This is a debug message.");
  LOGW("This is a warning.");
  LOGE("This is an error.");

  return 0;
}
2016-12-28 21:58:48 [Debug] test.cpp:11 main | This is a debug message.
2016-12-28 21:58:48 [Warning] test.cpp:12 main | This is a warning.
2016-12-28 21:58:48 [Error] test.cpp:13 main | This is an error.

License

Licensed under the MIT License.

About

Basic logging library

License:MIT License


Languages

Language:C++ 100.0%