<commit_before>#!/usr/bin/python3

import argparse
import itertools
import logging
import signal
import sys
import yaml

from lib.core import Core


FORMAT = "%(asctime)-15s %(levelname)s %(name)s %(message)s"
LOG = logging.getLogger("ROB")


def configure_logger(log_file, level):
    if level == "ERROR":
        LOG.setLevel(logging.ERROR)
    elif level == "WARN":
        LOG.setLevel(logging.WARN)
    elif level == "INFO":
        LOG.setLevel(logging.INFO)
    else:
        LOG.setLevel(logging.DEBUG)

    if log_file == "-":<commit_msg>Improve log formating<commit_after>#!/usr/bin/python3

import argparse
import itertools
import logging
import signal
import sys
import yaml

from lib.core import Core


FORMAT = "%(asctime)-15s %(levelname)7s %(name)s %(message)s"
LOG = logging.getLogger("ROB")


def configure_logger(log_file, level):
    if level == "ERROR":
        LOG.setLevel(logging.ERROR)
    elif level == "WARN":
        LOG.setLevel(logging.WARN)
    elif level == "INFO":
        LOG.setLevel(logging.INFO)
    else:
        LOG.setLevel(logging.DEBUG)

    if log_file == "-":
{'fraction_non_alphanumeric': 0.13236627379873073, 'fraction_numerical': 0.006346328195829556, 'mean_word_length': 3.433734939759036, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, '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': '597399', 'n_tokens_mistral': 377, 'n_tokens_neox': 365, 'n_words': 88}