From a1618aa1d16354c215f970be6d84d3f50d67b3c3 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Fri, 28 Oct 2016 14:59:30 +0000 Subject: [PATCH] Add markdown formatting to fedmsg err emails. This way, we can copy and paste the emails directly into github/pagure issues to track them. Like this one, for instance: https://github.com/fedora-infra/pdc-updater/issues/18 --- roles/fedmsg/base/templates/logging.py.j2 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/roles/fedmsg/base/templates/logging.py.j2 b/roles/fedmsg/base/templates/logging.py.j2 index 54ba3774fc..70cdbc91f7 100644 --- a/roles/fedmsg/base/templates/logging.py.j2 +++ b/roles/fedmsg/base/templates/logging.py.j2 @@ -152,20 +152,24 @@ class ContextInjector(logging.Filter): hefty_format = """Message ------- [%(asctime)s][%(name)10s %(levelname)7s] +```python %(message)s +``` %(farewell)s Process Details --------------- -host: %(host)s -PID: %(pid)s -name: %(proc_name)s -command: %(command_line)s -msg_id: %(msg_id)s +- host: %(host)s +- PID: %(pid)s +- name: %(proc_name)s +- command: %(command_line)s +- msg_id: %(msg_id)s Callstack that lead to the logging statement -------------------------------------------- +```python %(callstack)s +``` """