spdlog/bench/easylogging-bench.cpp

17 lines
363 B
C++
Raw Normal View History

2014-12-21 00:57:01 +08:00
#include "easylogging++.h"
_INITIALIZE_EASYLOGGINGPP
int main(int, char* [])
{
int howmany = 1000000;
2014-12-21 08:42:37 +08:00
2014-12-21 00:57:01 +08:00
// Load configuration from file
2014-12-21 08:42:37 +08:00
el::Configurations conf("easyl.conf");
el::Loggers::reconfigureLogger("default", conf);
for(int i = 0 ; i < howmany; ++i)
LOG(INFO) << "easylog message #" << i << ": This is some text for your pleasure";
return 0;
2014-12-21 00:57:01 +08:00
}