easylogging-bench.cpp 503 Bytes
Newer Older
gabime's avatar
gabime committed
1 2 3 4 5 6
//
// Copyright(c) 2015 Gabi Melman.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
//


gabime's avatar
gabime committed
7 8
#include "easylogging++.h"

9
_INITIALIZE_EASYLOGGINGPP
gabime's avatar
gabime committed
10 11 12

int main(int, char* [])
{
gabime's avatar
gabime committed
13
    int howmany = 1000000;
gabime's avatar
gabime committed
14

gabime's avatar
gabime committed
15 16 17
    // Load configuration from file
    el::Configurations conf("easyl.conf");
    el::Loggers::reconfigureLogger("default", conf);
gabime's avatar
gabime committed
18

gabime's avatar
gabime committed
19 20 21
    for(int i  = 0 ; i < howmany; ++i)
        LOG(INFO) << "easylog message #" << i << ": This is some text for your pleasure";
    return 0;
gabime's avatar
gabime committed
22
}