Skip to content

Commit add5d8a

Browse files
committed
update
1 parent 8ec04af commit add5d8a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Mailman/Queue/Runner.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,14 @@ def _oneloop(self):
173173
# Ask the switchboard for the message and metadata objects
174174
# associated with this filebase.
175175
msg, msgdata = self._switchboard.dequeue(filebase)
176+
try:
177+
from Mailman.Logging.Syslog import mailman_log
178+
mailman_log('debug', 'Runner._oneloop: Dequeued file %s, msg type: %s, msgdata type: %s', filebase, type(msg), type(msgdata))
179+
# Log a short summary of the message and msgdata
180+
mailman_log('debug', 'Runner._oneloop: msg repr: %r', repr(msg)[:500])
181+
mailman_log('debug', 'Runner._oneloop: msgdata keys: %s', list(msgdata.keys()) if isinstance(msgdata, dict) else str(msgdata))
182+
except Exception as e:
183+
mailman_log('error', 'Runner._oneloop: Exception during post-dequeue logging: %s', str(e))
176184
except (email.errors.MessageParseError, ValueError) as e:
177185
# Handle message parsing errors
178186
self.log_error('message_parse_error', e, filebase=filebase)

0 commit comments

Comments
 (0)