<commit_before># coding=utf-8
import os
import sys

# just some slight modifications to support sum and iter again
from subzero.sandbox import restore_builtins

module = sys.modules['__main__']
restore_builtins(module, {})

globals = getattr(module, "__builtins__")["globals"]
for key, value in getattr(module, "__builtins__").iteritems():
    if key != "globals":
        globals()[key] = value

import logger
import logging

# temporarily add the console handler and set it to DEBUG to catch errors upon imports
Core.log.addHandler(logger.console_handler)
Core.log.setLevel(logging.DEBUG)

sys.modules["logger"] = logger<commit_msg>revert debug logging in case the environment doesn't have a console; fixes #170<commit_after># coding=utf-8
import os
import sys

# just some slight modifications to support sum and iter again
from subzero.sandbox import restore_builtins

module = sys.modules['__main__']
restore_builtins(module, {})

globals = getattr(module, "__builtins__")["globals"]
for key, value in getattr(module, "__builtins__").iteritems():
    if key != "globals":
        globals()[key] = value

import logger

sys.modules["logger"] = logger
{'fraction_non_alphanumeric': 0.10745233968804159, 'fraction_numerical': 0.004332755632582322, 'mean_word_length': 5.48876404494382, 'pattern_counts': {'":': 2, '<': 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': '1173043', 'n_tokens_mistral': 342, 'n_tokens_neox': 341, 'n_words': 112}