diff options
author | Tulio Casagrande <tcasagra@thoughtworks.com> | 2017-02-07 15:09:19 -0200 |
---|---|---|
committer | Tulio Casagrande <tcasagra@thoughtworks.com> | 2017-02-07 15:12:36 -0200 |
commit | 2b8268f24dad481bf5274664b8699582f116d83d (patch) | |
tree | 7a0b0d63a0f853fd53debd6bc21a3ec374d9b9b0 /service/pixelated | |
parent | d4ef82a55053a0a672935104dda2a06eae8579ac (diff) |
[#952] Get rid of extra empty line on unhandled errors
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/config/logger.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/service/pixelated/config/logger.py b/service/pixelated/config/logger.py index 6a4b76d0..bc4ab8d4 100644 --- a/service/pixelated/config/logger.py +++ b/service/pixelated/config/logger.py @@ -45,8 +45,8 @@ def init(debug=False): try: event['log_time'] = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(event['log_time'])) event['log_level'] = event['log_level'].name.upper() - event['log_format'] = event.get('log_format') or '' - logstring = u'{log_time} [{log_namespace}] {log_level} ' + event['log_format'] + '\n' + event['log_format'] = str(event['log_format']) + '\n' if event.get('log_format') else '' + logstring = u'{log_time} [{log_namespace}] {log_level} ' + event['log_format'] return logstring.format(**event) except Exception as e: return "Error while formatting log event: {!r}\nOriginal event: {!r}\n".format(e, event) |