<commit_before>#! /usr/bin/env python3.6
# coding: utf-8
import sys
import logging
from logging.handlers import RotatingFileHandler
from pathlib import Path

from kamera import config

log = logging.getLogger()
log.setLevel(logging.INFO)

formatter = logging.Formatter(
    "[%(asctime)s] %(filename)s %(levelname)s - %(message)s"
)

log_name = Path(sys.argv[0]).stem
log_path = config.home / "log" / f"{log_name}.log"

fh = RotatingFileHandler(
    filename=log_path.as_posix(),
    maxBytes=20000,
    backupCount=5
)

fh.setLevel(logging.INFO)
fh.setFormatter(formatter)
log.addHandler(fh)

ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
ch.setFormatter(formatter)
log.addHandler(ch)<commit_msg>increase log size by an order of magnitude<commit_after>#! /usr/bin/env python3.6
# coding: utf-8
import sys
import logging
from logging.handlers import RotatingFileHandler
from pathlib import Path

from kamera import config

log = logging.getLogger()
log.setLevel(logging.INFO)

formatter = logging.Formatter(
    "[%(asctime)s] %(filename)s %(levelname)s - %(message)s"
)

log_name = Path(sys.argv[0]).stem
log_path = config.home / "log" / f"{log_name}.log"

fh = RotatingFileHandler(
    filename=log_path.as_posix(),
    maxBytes=200000,
    backupCount=5
)

fh.setLevel(logging.INFO)
fh.setFormatter(formatter)
log.addHandler(fh)

ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
ch.setFormatter(formatter)
log.addHandler(ch)
{'fraction_non_alphanumeric': 0.1317614424410541, 'fraction_numerical': 0.014563106796116505, 'mean_word_length': 5.328947368421052, 'pattern_counts': {'":': 0, '<': 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': '2527582', 'n_tokens_mistral': 537, 'n_tokens_neox': 511, 'n_words': 104}