Author lukas.lalinsky
Recipients lukas.lalinsky, vinay.sajip
Date 2011-04-23.18:24:47
SpamBayes Score 4.31604e-09
Marked as misclassified No
Message-id <1303583088.75.0.884405562286.issue11907@psf.upfronthosting.co.za>
In-reply-to
Content
It seems that I was wrong, the exception is indeed not propagated to the application, but handled by the handleError() method. I was confused by seeing the traceback in my uWSGI log file.

I'm unable to find a way to determine the maximum allowed syslog message size, otherwise the proper behavior would be probably to truncate the message. Specifically on FreeBSD, the clib source code seems to be using a buffer with 2048 bytes for the whole syslog line and 1024 bytes for the message formatting, so they are just arbitrary numbers. :(

There probably isn't a way to solve this cleanly. Truncating the message would be much preferable to dropping it, but I really don't know what would be the right size. 

I'll write a LocalSysLogHandler for me that uses the syslog module.

Regarding the line numbers, this is the version corresponding to the 2.7.1 release - http://hg.python.org/cpython/file/5395f96588d4/Lib/logging/handlers.py#l808
History
Date User Action Args
2011-04-23 18:24:48lukas.lalinskysetrecipients: + lukas.lalinsky, vinay.sajip
2011-04-23 18:24:48lukas.lalinskysetmessageid: <1303583088.75.0.884405562286.issue11907@psf.upfronthosting.co.za>
2011-04-23 18:24:47lukas.lalinskylinkissue11907 messages
2011-04-23 18:24:47lukas.lalinskycreate