encfs/vendor/github.com/muflihun/easyloggingpp/samples/STL/configurator.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

30 lines
793 B
C++

//
// This file is part of Easylogging++ samples
//
// Very basic sample to configure using el::Configuration and configuration file
//
// Revision 1.1
// @author mkhan3189
//
#include "easylogging++.h"
INITIALIZE_EASYLOGGINGPP
int main(int argc, char** argv) {
START_EASYLOGGINGPP(argc, argv);
LOG(INFO) << "Info log using 'default' logger before using configuration";
el::Configurations confFromFile("../default-logger.conf");
el::Loggers::reconfigureAllLoggers(confFromFile);
LOG(INFO) << "Info log after manually configuring 'default' logger";
el::Loggers::getLogger("default")->reconfigure();
LOG(ERROR) << "Error log";
LOG(WARNING) << "WARNING! log";
VLOG(1) << "Verbose log 1";
VLOG(2) << "Verbose log 2";
return 0;
}