<commit_before>#include <log4cpp/Category.hh>
#include <log4cpp/Appender.hh>
#include <log4cpp/OstreamAppender.hh>
#include <log4cpp/Layout.hh>
#include <log4cpp/PatternLayout.hh>
#include <log4cpp/Priority.hh>

#include "LoggerFactory.h"

using namespace Log;

bool LoggerFactory::isCreated = false;
log4cpp::Category *LoggerFactory::instance;

LoggerFactory::LoggerFactory() {}

/* Factory for a simple log4cpp logger. */
log4cpp::Category* LoggerFactory::create() {
    log4cpp::Category *logger = &log4cpp::Category::getRoot();
    log4cpp::Appender *p_appender = new log4cpp::OstreamAppender("console", &std::cout);
    log4cpp::PatternLayout *layout = new log4cpp::PatternLayout();
    layout->setConversionPattern("%d{%Y-%m-%d %H:%M:%S} [%p] %c: %m%n");
    p_appender->setLayout(layout);

    logger->setPriority(log4cpp::Priority::DEBUG);
    logger->addAppender(p_appender);
    return logger;
}<commit_msg>Change logging level to INFO (DEBUG is slowing down the execution too much).<commit_after>#include <log4cpp/Category.hh>
#include <log4cpp/Appender.hh>
#include <log4cpp/OstreamAppender.hh>
#include <log4cpp/Layout.hh>
#include <log4cpp/PatternLayout.hh>
#include <log4cpp/Priority.hh>

#include "LoggerFactory.h"

using namespace Log;

bool LoggerFactory::isCreated = false;
log4cpp::Category *LoggerFactory::instance;

LoggerFactory::LoggerFactory() {}

/* Factory for a simple log4cpp logger. */
log4cpp::Category* LoggerFactory::create() {
    log4cpp::Category *logger = &log4cpp::Category::getRoot();
    log4cpp::Appender *p_appender = new log4cpp::OstreamAppender("console", &std::cout);
    log4cpp::PatternLayout *layout = new log4cpp::PatternLayout();
    layout->setConversionPattern("%d{%Y-%m-%d %H:%M:%S} [%p] %c: %m%n");
    p_appender->setLayout(layout);

    logger->setPriority(log4cpp::Priority::INFO);
    logger->addAppender(p_appender);
    return logger;
}
{'fraction_non_alphanumeric': 0.1608649789029536, 'fraction_numerical': 0.016877637130801686, 'mean_word_length': 6.41015625, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4791684', 'n_tokens_mistral': 640, 'n_tokens_neox': 633, 'n_words': 118}