spdlog/bench/easylogging-bench.cpp

22 lines
501 B
C++
Raw Normal View History

2015-11-28 11:24:20 -05:00
//
// Copyright(c) 2015 Gabi Melman.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
//
2014-12-20 11:57:01 -05:00
#include "easylogging++.h"
2016-05-05 03:19:32 -04:00
_INITIALIZE_EASYLOGGINGPP
2014-12-20 11:57:01 -05:00
2018-03-09 08:26:33 -05:00
int main(int, char *[])
2014-12-20 11:57:01 -05:00
{
2014-12-20 19:47:04 -05:00
int howmany = 1000000;
2014-12-20 19:42:37 -05:00
2014-12-20 19:47:04 -05:00
// Load configuration from file
el::Configurations conf("easyl.conf");
el::Loggers::reconfigureLogger("default", conf);
2014-12-20 19:42:37 -05:00
2018-03-09 08:26:33 -05:00
for (int i = 0; i < howmany; ++i)
2014-12-20 19:47:04 -05:00
LOG(INFO) << "easylog message #" << i << ": This is some text for your pleasure";
return 0;
2014-12-20 11:57:01 -05:00
}