<commit_before>import logging
import sys
import types

import maya.OpenMaya as OpenMaya

LOGGER_PREFIX = 'kraken.mayaLogger'


class MayaLogger(logging.Logger):

    def fatal(self, msg, *args, **kwargs):
        self.log(45, msg, *args, **kwargs)

    def comment(self, msg, *args, **kwargs):
        self.log(5, msg, *args, **kwargs)


class MayaHandler(logging.Handler):

    def emit(self, record):

        if isinstance(record.msg, types.StringTypes):
            msg = self.format(record)
        else:
            record.msg = str(record.msg)
            msg = self.format(record)

        if record.levelno > logging.CRITICAL:
            OpenMaya.MGlobal.displayError(msg)
        elif record.levelno in [logging.ERROR, 45]:
            OpenMaya.MGlobal.displayError(msg)
        elif record.levelno > logging.WARNING:
            OpenMaya.MGlobal.displayWarning(msg)
        elif record.levelno > logging.INFO:
            OpenMaya.MGlobal.displayInfo(msg)
        elif record.levelno <= logging.DEBUG:
            OpenMaya.MGlobal.displayInfo(msg)
        else:<commit_msg>quick fix blah<commit_after>import logging
import sys
import types

import maya.OpenMaya as OpenMaya

LOGGER_PREFIX = 'kraken.mayaLogger'

thing = "blah"

class MayaLogger(logging.Logger):

    def fatal(self, msg, *args, **kwargs):
        self.log(45, msg, *args, **kwargs)

    def comment(self, msg, *args, **kwargs):
        self.log(5, msg, *args, **kwargs)


class MayaHandler(logging.Handler):

    def emit(self, record):

        if isinstance(record.msg, types.StringTypes):
            msg = self.format(record)
        else:
            record.msg = str(record.msg)
            msg = self.format(record)

        if record.levelno > logging.CRITICAL:
            OpenMaya.MGlobal.displayError(msg)
        elif record.levelno in [logging.ERROR, 45]:
            OpenMaya.MGlobal.displayError(msg)
        elif record.levelno > logging.WARNING:
            OpenMaya.MGlobal.displayWarning(msg)
        elif record.levelno > logging.INFO:
            OpenMaya.MGlobal.displayInfo(msg)
        elif record.levelno <= logging.DEBUG:
            OpenMaya.MGlobal.displayInfo(msg)
        else:
{'fraction_non_alphanumeric': 0.1111619396157365, 'fraction_numerical': 0.004574565416285453, 'mean_word_length': 2.5160771704180065, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '2620029', 'n_tokens_mistral': 683, 'n_tokens_neox': 662, 'n_words': 143}