[syslog-ng]unwanted space at the end of each line

Balazs Scheidler syslog-ng@lists.balabit.hu
Fri, 07 Jan 2005 00:01:21 +0100


On Thu, 2005-01-06 at 15:07 +0100, Bernard Brandl wrote:
> hi everybody,
> 
> I've a problem when syslog-ng writes remote logs,
> each time the log message is sent over the network,
> syslog-ng add a white space at the end of the line.
> 
> e.g :
> 
> 	[root@keweb01 root]# logger -d -p local3.info "nanard"
> 
> at the same time, on the central log host :
> 
> 	[kelogs01]# strace -p 27431 -s 1500 -e recvfrom,write
> 	recvfrom(3, "<158>Jan  6 14:09:45 keweb01.search.test.ke.echo root: nanard\n", 2048, 0, {sa_family=AF_INET, sin_port=htons(33594), sin_addr=inet_addr("10.234.56.130")}, [16]) = 62
> 	write(10, "Jan  6 14:09:45 keweb01.search.test.ke.echo root: nanard \n", 58) = 58
> 
> the message "nanard\n" was changed into "nanard \n"
> 
> I use the same options for all hosts :
> 
> #       template("$DAY/$MONTH/$YEAR $HOUR:$MIN:$SEC $HOST $MSG\n")
> #       template_escape(off)
> 
> syslog-ng version 1.6.4

upgrade to 1.6.5, it strips off exactly one NL or NUL character from the
line received from UDP peers.

-- 
Bazsi