[syslog-ng]replacing part of prog name with hostname

Nate Campi nate@campin.net
Sat, 4 Jan 2003 12:50:30 -0800


On Sat, Jan 04, 2003 at 02:55:51PM +0300, Borzenkov Andrey wrote:
> > It knows to actually shift the message over one place to the right and
> > stick the value of the $FULLHOST_FROM macro in there. Even if I tried
> > templating out the message on my own syslog-ng will still think that
> > "ctlds" or "last" isn't part of the message and it'll get lost.
> 
> Better is to implement source templates. This way you can precisely describe
> input line, so if you know your source never appends host name, you just
> omit this from template. Something like
> 
> source s_stream { unix-stream("/dev/log" max-connections(10)); template(DATE
> PROG[PID]:... );}; 

You missed the fact that before you ever get around to templating, part
of the program name is *already* lost. It's too late for that.
-- 
Nate Campi   http://www.campin.net 

"Don't go around saying the world owes you a living. The world owes you 
nothing. It was here first." - Samuel Clemens