<commit_before>#include <stdlib.h>
#include <log4cxx/logger.h>
#include <log4cxx/fileappender.h>
#include <log4cxx/htmllayout.h>
#include <log4cxx/helpers/exception.h>

using namespace log4cxx;
using namespace log4cxx::helpers;

int main()
{
  int result = EXIT_SUCCESS;

  try
  {
    LayoutPtr layout = new HTMLLayout();

    FileAppender *fileAppender =
      new FileAppender(layout, _T("result"), false);

    LoggerPtr rootLogger = Logger::getRootLogger();
    rootLogger->addAppender(fileAppender);

    rootLogger->debug(_T("debug message"));
    rootLogger->info(_T("info message"));
    rootLogger->warn(_T("warn message"));
    rootLogger->error(_T("error message"));
    rootLogger->fatal(_T("fatal message"));
  }
  catch(Exception&)
  {
    result = EXIT_FAILURE;<commit_msg>use console appender instead of file appender<commit_after>#include <stdlib.h>
#include <log4cxx/logger.h>
#include <log4cxx/consoleappender.h>
#include <log4cxx/htmllayout.h>
#include <log4cxx/helpers/exception.h>

using namespace log4cxx;
using namespace log4cxx::helpers;

int main()
{
  int result = EXIT_SUCCESS;

  try
  {
    LayoutPtr layout = new HTMLLayout();

    AppenderPtr consoleAppender =
      new ConsoleAppender(layout, _T("System.out"));

    LoggerPtr rootLogger = Logger::getRootLogger();
    rootLogger->addAppender(consoleAppender);

    rootLogger->debug(_T("debug message"));
    rootLogger->info(_T("info message"));
    rootLogger->warn(_T("warn message"));
    rootLogger->error(_T("error message"));
    rootLogger->fatal(_T("fatal message"));
  }
  catch(Exception&)
  {
    result = EXIT_FAILURE;
{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.0074211502782931356, 'mean_word_length': 4.758007117437723, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 25, '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': '4411828', 'n_tokens_mistral': 542, 'n_tokens_neox': 534, 'n_words': 102}