[syslog-ng]Re: messages with newlines

Balazs Scheidler bazsi@balabit.hu
Sat, 1 Feb 2003 12:04:36 +0100


On Fri, Jan 31, 2003 at 04:09:25PM +0300, Dmitry Frolov wrote:
> Hello,
> 
> I found that problem described only occurs if udp packet does not end with \0.
> This id little test for it:

syslog-ng takes \n as line terminator. Generally you should not include '\n'
in log messages.

> Results are following:
> 
> 1. Message not splitted
> Jan 31 13:51:30 localhost yadda[12345]: Time to die. die now!
> 
> 2. No \0 at the end - message is splitted
> Jan 31 13:51:30 localhost yadda[12345]: Time to die.
> Jan 31 16:06:09 localhost die now!
> 
> 3. No timestamp in packet - program name becomes correct
> Jan 31 16:06:10 localhost Yadda yadda[12345]: Time to die. die now!

Program names should not contain spaces either. There's no way to know
whether the first word is a hostname or is part of the program. (though the
option bad_hostname() added lately should help you here)

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1