SA Bugzilla – Bug 7817
Pyzor.pm - Show traceback in log?
Last modified: 2020-07-13 07:25:37 UTC
Currently, when pyzor produces a python exception, this is detected by Pyzor.pm and the log shows "pyzor: internal error, python traceback seen in response", but without logging the actual traceback or response. This makes it hard to debug such a backtrace. It seems you can enable debug output to get the full response, but that would (I think) log *all* pyzor responses and a lot of other SA debug output too (unless it is possible to enable debug only for Pyzor, have not checked). Please consider improving this. Possible solutions I can imagine, in decreasing order of (my) preference: 1. When a stacktrace is detected, print the entire response, including the stacktrace. 2. If 1. is considered too verbose, maybe add a specif option to enable printing full responses on backtraces, and refer to that option in the default concise error message. 3. As a better-than-nothing option, point out that enabling debug output will print the stacktrace itself, ideally referring to some documentation about this. I've observed this behavior with 3.4.2 from Debian stable, but it looks like it is unchanged in SVN trunk: https://github.com/apache/spamassassin/blob/bd603c8dcf9dc3b9f945ea2aef2d894401aff864/lib/Mail/SpamAssassin/Plugin/Pyzor.pm#L535-L539
I think it's fine to print traceback in log message, added. Sending spamassassin-3.4/lib/Mail/SpamAssassin/Plugin/Pyzor.pm Sending trunk/lib/Mail/SpamAssassin/Plugin/Pyzor.pm Transmitting file data ..done Committing transaction... Committed revision 1879806.
Commit looks good, thanks!