From 046c2c7a50baf7119df86447d9fc1d4b28782c72 Mon Sep 17 00:00:00 2001 From: Gabriel Nagy Date: Thu, 21 Mar 2024 11:54:21 +0200 Subject: [PATCH] Include journal errors and adsys logs in apport To reduce the back and forth with bug reporters, update our apport hook to attach more helpful information to reports. We now include journal errors around the report timestamp (+/- 10 minutes), and any journal messages containing "adsys" -- this includes logs emitted by the service and possibly more messages referring to adsys which do not necessarily come from the service. Fixes #944 / UDENG-2489 --- debian/adsys.apport | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/adsys.apport b/debian/adsys.apport index 7862e1d84..14258a4f1 100644 --- a/debian/adsys.apport +++ b/debian/adsys.apport @@ -4,6 +4,9 @@ ''' import apport.hookutils +import re def add_info(report): apport.hookutils.attach_related_packages(report, ["sssd", "python3-samba"]) + apport.hookutils.attach_journal_errors(report, 600) + report['Syslog'] = apport.hookutils.recent_syslog(re.compile("adsys"))