<commit_before>import logging
import time

try:
    import statzlogger as szl
except ImportError:
    szl = None

stream = logging.StreamHandler()
szllog = logging.getLogger("statzlogger")
szllog.setLevel(logging.DEBUG)
stream.setFormatter(logging.Formatter())
szllog.addHandler(stream)

# Implementations of szl concepts found in section 'Actions 1: The
# emit statement':
#
#   http://szl.googlecode.com/svn/doc/sawzall-language.html
#
# These calls should not fail if statzlogger can't be found.

numdivafans = logging.getLogger("stats.numdivafans")
sales = logging.getLogger("stats.sales")
fileoffans = logging.getLogger("stats.fileoffans")
salesperhour = logging.getLogger("stats.salesperhour")
top100songs = logging.getLogger("stats.top100songs")

if szl is not None:
    numdivafans.addHandler(szl.Sum())
    sales.addHandler(szl.Sum())<commit_msg>Configure stats parent logger.<commit_after>import logging
import time

try:
    import statzlogger as szl
except ImportError:
    szl = None

stream = logging.StreamHandler()
szllog = logging.getLogger("statzlogger")
szllog.setLevel(logging.DEBUG)
stream.setFormatter(logging.Formatter())
szllog.addHandler(stream)

# Implementations of szl concepts found in section 'Actions 1: The
# emit statement':
#
#   http://szl.googlecode.com/svn/doc/sawzall-language.html
#
# These calls should not fail if statzlogger can't be found.

stats = logging.getLogger("stats")
stats.setLevel(logging.DEBUG)

numdivafans = logging.getLogger("stats.numdivafans")
sales = logging.getLogger("stats.sales")
fileoffans = logging.getLogger("stats.fileoffans")
salesperhour = logging.getLogger("stats.salesperhour")
top100songs = logging.getLogger("stats.top100songs")

if szl is not None:
    numdivafans.addHandler(szl.Sum())
    sales.addHandler(szl.Sum())
{'fraction_non_alphanumeric': 0.1165644171779141, 'fraction_numerical': 0.007808142777467931, 'mean_word_length': 5.719101123595506, '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': '6768306', 'n_tokens_mistral': 600, 'n_tokens_neox': 579, 'n_words': 125}