encfs/vendor/github.com/muflihun/easyloggingpp/samples/STL/conditional.cpp
Valient Gough 5f0806c5cc Add "easylogging" from "https://github.com/muflihun/easyloggingpp@master"
git-vendor-name: easylogging
git-vendor-dir: vendor/github.com/muflihun/easyloggingpp
git-vendor-repository: https://github.com/muflihun/easyloggingpp
git-vendor-ref: master
2017-08-05 23:23:41 -07:00

25 lines
484 B
C++

//
// This file is part of EasyLogging++ samples
//
// Conditional logging using LOG_IF, you can use CLOG_IF(condition, loggerID) macro to use your own logger if you
// don't want to use default logger
//
// Revision 1.1
// @author mkhan3189
//
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
int main(void) {
LOG_IF(1 == 1, INFO) << "1 is equal to 1";
LOG_IF(1 > 2, INFO) << "1 is greater than 2";
LOG_IF(1 == 2, DEBUG) << "1 is equal to 2";
return 0;
}