def log_level_to_color(level): return { level.DEBUG: None, level.INFO: Qt.green, level.WARNING: Qt.yellow, level.ERROR: Qt.red, }.get(level.value)