On Oct 6, 6:56 pm, "Dustin C. Hatch" <admiraln...@gmail.com> wrote:
> > My question, therefore, is where does this problem lie? Is it a bug in > Metalog that it doesn't properly parse the message, or is it a bug in > SysLogHandler that it doesn't properly format it? I guess it could > also be that if one wants to use the SysLogHandler, then that > particular format string must be used to ensure compatibility with all > syslog daemons. I found a couple of examples[2][3] of people Hi Dustin, Thanks for the detailed report. I tried posting a response a couple of times, but Google appears to have swallowed it ... trying again. Sorry if it results in multiple responses. The SysLogHandler aims to work within RFC 5424, though that does provide for some flexibility in message formats. The SysLogHandler sends <priority>formatted message, as you've observed, with the "formatted message" part encoded in UTF-8 with a prepended BOM if it's Unicode. The existing SysLogHandler code seems to work OK with syslog, syslog-ng and rsyslog - perhaps these are more forgiving than Metalog in the way they parse messages, or perhaps it's a Metalog configuration issue. I'd try posting this issue to the Metalog forum / mailing list to see what feedback they can give. If you do think it's a bug in SysLogHandler then please create an issue on bugs.python.org and assign it to me, so I can take a look at it; however, I think using an appropriate Formatter will ensure interoperability in any particular scenario. I don't especially want to hard-code any format into SysLogHandler, since a Formatter can be used to set the format flexibly. Regards, Vinay Sajip -- http://mail.python.org/mailman/listinfo/python-list