From a3924440b983c272726984094a4126b255e56602 Mon Sep 17 00:00:00 2001 From: Andrei Date: Wed, 4 Jan 2017 06:26:14 -0600 Subject: [PATCH] etc - better default log format --- disco/util/logging.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/disco/util/logging.py b/disco/util/logging.py index 5ce9498..68af8a8 100644 --- a/disco/util/logging.py +++ b/disco/util/logging.py @@ -7,8 +7,11 @@ LEVEL_OVERRIDES = { 'requests': logging.WARNING } +LOG_FORMAT = '[%(levelname)s] %(asctime)s - %(name)s:%(lineno)d - %(message)s' def setup_logging(**kwargs): + kwargs.setdefault('format', LOG_FORMAT) + logging.basicConfig(**kwargs) for logger, level in LEVEL_OVERRIDES.items(): logging.getLogger(logger).setLevel(level)