From b80bbaf2b31cc60a5677c42145f07a833b35077b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= <philipp@hoerist.com> Date: Sun, 10 Mar 2019 10:07:12 +0100 Subject: [PATCH] Improve log message format --- gajim/common/logging_helpers.py | 4 ++-- gajim/common/modules/util.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gajim/common/logging_helpers.py b/gajim/common/logging_helpers.py index 1adb9d1431..53f9856c2b 100644 --- a/gajim/common/logging_helpers.py +++ b/gajim/common/logging_helpers.py @@ -125,9 +125,9 @@ class FancyFormatter(logging.Formatter): if self.use_color: c = FancyFormatter.colors_mapping.get(level, '') record.levelname = colorize(record.levelname, c) - record.name = colorize(record.name, colors.CYAN) + record.name = '%-25s' % colorize(record.name, colors.CYAN) else: - record.name += ':' + record.name = '%-25s|' % record.name return logging.Formatter.format(self, record) diff --git a/gajim/common/modules/util.py b/gajim/common/modules/util.py index 7da2e8684e..0cf08f803e 100644 --- a/gajim/common/modules/util.py +++ b/gajim/common/modules/util.py @@ -86,4 +86,4 @@ def get_eme_message(eme_data): class LogAdapter(LoggerAdapter): def process(self, msg, kwargs): - return '[%s] %s' % (self.extra['account'], msg), kwargs + return '(%s) %s' % (self.extra['account'], msg), kwargs -- GitLab