[syslog-ng] problem with logger -t and $TAG

JUNG, Christian christian.jung at saarstahl.com
Thu Aug 14 12:37:42 CEST 2008


The TAG macro is the facility/priority information in a syslog message (logger option -p) not the tag you define with logger (-t). Try the PROGRAM (should be the string you've defined with -t) and MSGONLY (rest of the message) macros.


bye
Chris

> -----Original Message-----
> From: syslog-ng-bounces at lists.balabit.hu
> [mailto:syslog-ng-bounces at lists.balabit.hu]On Behalf Of Nilshar
> Sent: Thursday, August 14, 2008 11:59 AM
> To: syslog-ng at lists.balabit.hu
> Subject: [syslog-ng] problem with logger -t and $TAG
> 
> 
> Hello everyone.
> 
> Ok first sorry if this question has already been answered in an older
> thread, but I found no way to search easily through the archives :/
> 
> So my problem is :
> 
> I'm telling apache to log access logs to logger like that :
> >> TransferLog "| /usr/bin/logger -p local0.info -t apache_access"
> 
> so using the -t to define a custom tag, so I can easily filter it
> using match() in filters.
> 
> as a destination in syslog-ng, I want a file with usual apache format,
> so using :
> >> destination df_apache_access {
> >>        file("/var/log/apache/access.log"
> >>        template("$MESSAGE\n") );
> >> };
> 
> 
> But in the file I got the apache_access: tag before the $MESSAGE. I
> was thinking it would go to $TAG, which seems not be the case.
> 
> It's probably more a problem with logger... but wondering if anyone is
> able to point me a way to fix that issue.. maybe using something else
> than logger ?
> 
> Thanks.
> Nilshar.
> ______________________________________________________________
> ________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: 
http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.campin.net/syslog-ng/faq.html



More information about the syslog-ng mailing list