diff options
-rw-r--r-- | rumba/log.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/rumba/log.py b/rumba/log.py index ebb76dc..e856b42 100644 --- a/rumba/log.py +++ b/rumba/log.py @@ -8,11 +8,17 @@ import multiprocessing def setup(): handler = logging.StreamHandler(sys.stdout) handler.lock = multiprocessing.RLock() - logging.basicConfig(format='{asctime} | {levelname:8.8} | ' - '{name:15.15} | {message}', + logging.basicConfig(format='{asctime} | {levelname:3.3} | ' + '{name:11.11} | {message}', style='{', + datefmt='%H:%M:%S', handlers=[handler], level=logging.DEBUG) + logging.addLevelName(logging.CRITICAL, 'CRT') + logging.addLevelName(logging.ERROR, 'ERR') + logging.addLevelName(logging.WARNING, 'WRN') + logging.addLevelName(logging.INFO, 'INF') + logging.addLevelName(logging.DEBUG, 'DBG') logging.getLogger('').setLevel(logging.ERROR) |