[syslog-ng] trailing spaces on udp messages (now with NULLs!)

Johan Fischer jfischer at cmcrc.com
Tue Jan 23 01:58:19 CET 2007


Works for me too, Thanks :)

Some programs still have trailing spaces in their logs like openldap and the 
kernel iptables message, but I guess we can't do much about it ... ( an option 
in the source / dest to trim spaces maybe ? ).

There is also one last part in the syslog-ng internal messages which has a 
trailing space:

Jan 23 11:45:04 s_internal at mira syslog-ng[6559]: SIGTERM received, terminating;

(space after the semicolon)

Any idea about it ? (this one is not critical at all).

Cheers.
J.


Paul Krizak wrote:
> Your patch appears to fix the problem.  Thanks!
> 
> Paul Krizak                         5900 E. Ben White Blvd. MS 625
> Advanced Micro Devices              Austin, TX  78741
> Linux/Unix Systems Engineering      Phone: (512) 602-8775
> Silicon Design Division             Cell:  (512) 791-0686
> 
> 
> Balazs Scheidler wrote:
>> On Fri, 2007-01-19 at 11:28 -0600, Paul Krizak wrote:
>>> It appears that the changes to logreader.c between rc1 and rc2 are 
>>> what broke it.  Unfortunately this is where my debugging prowess 
>>> ends, and hopefully Balazs picks up.
>>>
>>> FYI, copying logreader.c from the 2.0rc1 release into the 2.0.1 
>>> release compiles and works fine, and will be my holdover solution 
>>> until 2.0.2 is released with the appropriate fix.
>>
>> Can you check if the patch below fixes it? It does for me. (I've also
>> committed the fix, so it should be included in tomorrow's snapshot)
>>
>> --- orig/src/logmsg.c
>> +++ mod/src/logmsg.c
>> @@ -134,6 +134,9 @@ log_msg_parse(LogMessage *self, gchar *d
>>    char *oldsrc;
>>    int oldleft, stamp_length;
>>    +  while (length > 0 && (data[length - 1] == '\n' || data[length - 
>> 1] == '\0'))
>> +    length--;
>> +     if (flags & LP_NOPARSE)
>>      {
>>        g_string_assign_len(self->msg, data, length);
>>
>>
>>
>>
>>
> 
> 
> _______________________________________________
> syslog-ng maillist  -  syslog-ng at lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
> 

-- 
Johan Fischer
Capital Markets Surveillance Services Pty Limited
Level 2, 9 Castlereagh Street, Sydney NSW 2000
Tel: +61 2 9233 7999   Direct: +61 2 9236 9150
Fax: +61 2 9236 9177   http://www.cmss-systems.com

Capital Markets Surveillance Services Pty Ltd (CMSS) - Confidential
Communication
The information contained in this e-mail is confidential. It is intended
solely for the addressee. If you receive this e-mail by mistake please
promptly inform us by reply e-mail and then delete the e-mail and
destroy any printed copy. You must not disclose or use in any way the
information in the e-mail. There is no warranty that this e-mail is
error or virus free. It may be a private communication, and if so, does
not represent the views of the CMCRC and its associates. If it is a
private communication, care should be taken in opening it to ensure that
undue offence is not given.


More information about the syslog-ng mailing list