getlogbook / logbook

A cool logging replacement for Python.
http://logbook.readthedocs.org
Other
1.48k stars 165 forks source link

Should use newline character, not null, for TCP record terminator #241

Open jikamens opened 7 years ago

jikamens commented 7 years ago

As per https://github.com/getlogbook/logbook/blob/master/logbook/handlers.py#L1430, Logbook marks the end of SyslogHandler records with a null character.

I don't know whether this is correct when sending to a socket, but as far as I can tell, the correct record terminator when sending over TCP is newline, not null, and no terminator should be included at all when sending over UDP.

Because it's using a null character instead of a newline, rsyslogd doesn't properly interpret messages sent to it by Logbook via TCP.