spdlog/bench/easylogging-bench.cpp

23 lines
503 B
C++
Raw Normal View History

2015-11-29 00:24:20 +08:00
//
// Copyright(c) 2015 Gabi Melman.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
//
2014-12-21 00:57:01 +08:00
#include "easylogging++.h"
2016-05-05 15:19:32 +08:00
_INITIALIZE_EASYLOGGINGPP
2014-12-21 00:57:01 +08:00
int main(int, char* [])
{
2014-12-21 08:47:04 +08:00
int howmany = 1000000;
2014-12-21 08:42:37 +08:00
2014-12-21 08:47:04 +08:00
// Load configuration from file
el::Configurations conf("easyl.conf");
el::Loggers::reconfigureLogger("default", conf);
2014-12-21 08:42:37 +08:00
2014-12-21 08:47:04 +08:00
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
}