logging: Use stdout instead.

This commit is contained in:
Dylan Araps 2018-04-02 07:24:37 +10:00
parent b649563eba
commit cc133a7f41

View File

@ -6,6 +6,7 @@ import json
import logging
import os
import subprocess
import sys
class Color:
@ -97,7 +98,8 @@ def setup_logging():
logging.basicConfig(format=("[%(levelname)s\033[0m] "
"\033[1;31m%(module)s\033[0m: "
"%(message)s"),
level=logging.INFO)
level=logging.INFO,
stream=sys.stdout)
logging.addLevelName(logging.ERROR, '\033[1;31mE')
logging.addLevelName(logging.INFO, '\033[1;32mI')
logging.addLevelName(logging.WARNING, '\033[1;33mW')