Browse Source

etc - better default log format

feature/docs
Andrei 8 years ago
parent
commit
a3924440b9
  1. 3
      disco/util/logging.py

3
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)

Loading…
Cancel
Save