[syslog-ng] no_multi_line - have cake, eat too

Ross Andrus andrus at skytap.com
Wed Mar 18 19:19:47 CET 2009


Hi,

Thanks for the great tool!

I really enjoy the power and flexibility of syslog-ng, and I wanted to  
send along a local modification I've made to the 3.0.1 release.

My situation is that I'd like to have *both* the traditional behavior  
in which newlines are replaced with spaces, and also the new  
no_multi_line feature. Basically, developers want to see the stack  
traces, operations wants simple scanning and analysis.

So, I created a new template macro named "ONELINE" that is a variant  
of the MSGONLY macro, but it makes a local copy of the buffer and  
performs the newline replacement on it, then sends it off.

I didn't put any time into thinking about performance, so I won't be  
surprised to here there's a better way or etc, but it works well  
enough so far.


Regards

Ross Andrus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: syslog-online.diff
Type: application/octet-stream
Size: 1094 bytes
Desc: not available
Url : http://lists.balabit.hu/pipermail/syslog-ng/attachments/20090318/1908bf71/attachment.obj 
-------------- next part --------------



More information about the syslog-ng mailing list