<commit_before>import logging

def default_logging(grab_log='/tmp/grab.log'):
    """
    Customize logging output to display all log messages
    except grab network logs.

    Redirect grab network logs into file.
    """

    logging.basicConfig(level=logging.DEBUG)
    glog = logging.getLogger('grab')
    glog.propagate = False
    if grab_log:
        hdl = logging.FileHandler(grab_log, 'w')
        glog.addHandler(hdl)<commit_msg>Create additional options for default_logging function<commit_after>import logging

def default_logging(grab_log='/tmp/grab.log', level=logging.DEBUG, mode='a'):
    """
    Customize logging output to display all log messages
    except grab network logs.

    Redirect grab network logs into file.
    """

    logging.basicConfig(level=level)
    glog = logging.getLogger('grab')
    glog.propagate = False
    if grab_log:
        hdl = logging.FileHandler(grab_log, mode)
        glog.addHandler(hdl)
{'fraction_non_alphanumeric': 0.09735449735449736, 'fraction_numerical': 0.0, 'mean_word_length': 3.4205607476635516, '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': '2051339', 'n_tokens_mistral': 291, 'n_tokens_neox': 281, 'n_words': 72}