def METHOD_NAME(self, level, html):
    level = level.upper()
    if level == 'HTML':
        return 'INFO', True
    if level == 'CONSOLE':
        level = 'INFO'
    if level not in LEVELS:
        raise DataError("Invalid log level '%s'." % level)
    return level, html