|
|
@ -8,6 +8,7 @@ from settings import settings
|
|
|
|
|
|
|
|
|
|
|
|
log = logging.getLogger("util")
|
|
|
|
log = logging.getLogger("util")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
debug = False
|
|
|
|
|
|
|
|
|
|
|
|
# Color definitions
|
|
|
|
# Color definitions
|
|
|
|
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
|
|
|
|
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
|
|
|
@ -60,6 +61,8 @@ def get_logger(name):
|
|
|
|
|
|
|
|
|
|
|
|
# Define the logger on the base class
|
|
|
|
# Define the logger on the base class
|
|
|
|
log = logging.getLogger(name)
|
|
|
|
log = logging.getLogger(name)
|
|
|
|
|
|
|
|
if debug:
|
|
|
|
|
|
|
|
log.setLevel(logging.DEBUG)
|
|
|
|
|
|
|
|
|
|
|
|
# Add the handler and stop it being silly and printing everything twice
|
|
|
|
# Add the handler and stop it being silly and printing everything twice
|
|
|
|
log.addHandler(ch)
|
|
|
|
log.addHandler(ch)
|
|
|
|