Skip to content

Commit a6e0007

Browse files
committed
runner: Add coloured logging
1 parent 7f5926c commit a6e0007

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

runner.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def setup_logging(logfile=None, debug=False):
3030
handler.setFormatter(fmt)
3131
log.addHandler(handler)
3232
else:
33+
logging.addLevelName(logging.DEBUG, '\x1b[36;20mDEBUG\x1b[0m')
34+
logging.addLevelName(logging.ERROR, '\x1b[31;20mERROR\x1b[0m')
35+
logging.addLevelName(logging.WARNING, '\x1b[33;20mWARNING\x1b[0m')
3336
logger.warning('Logging to file is disabled')
3437

3538
yield

0 commit comments

Comments
 (0)