[PATCH] Re: Limit msg body length in debug output
nicolas.s-dev at laposte.net
Thu May 5 19:18:24 BST 2011
On Wed, May 04, 2011 at 06:00:01PM +0200, Sebastian Spaeth wrote:
> We were outputting full message bodies to the debug log (often stderr),
> and then again (as they go over the imaplib2 wire, imaplib logs
> everything too). Not only is quite a privacy issue when sending in debug
> logs but it can also freeze a console for quite some time. Plus it
> bloats debug logs A LOT.
> Only output the first and last 100 bytes of each message body to the
> debug log (we still get the full body from imaplib2 logging). This
> limits privacy issues when handing the log to someone else, but usually
> still contains all the interesting bits that we want to see in a log.
I don't think it's a good strategy. We may have errors due to unexpected
headers or so. I would rather keep the whole headers (maybe trimed from the
"Received:" content, though).
Why should we care of the last byte of the message?
More information about the OfflineIMAP-project