[syslog-ng] logging facility in log file
Jing CDL Sun
sjing at cn.ibm.com
Mon Jun 30 17:59:44 CEST 2008
Thank you so much, Sandor.
I will try this method today, and let you know the result..
By the way, is there any material about the usage of macros in templates,
that's very helpful for us to use the syslog-ng tool.
"Geller, Sandor
\(IT\)"
<Sandor.Geller at mo To
rganstanley.com> "'Syslog-ng users' and developers'
Sent by: mailing list'"
syslog-ng-bounces <syslog-ng at lists.balabit.hu>
@lists.balabit.hu cc
Subject
2008-06-30 23:41 Re: [syslog-ng] logging facility in
log file
Please respond to
"Syslog-ng users'
and developers'
mailing list"
<syslog-ng at lists.
balabit.hu>
Hi,
> Thank you, Sandor.
>
> I have read the syslog-ng documentation, and only found a
> FACILITY and PRIORITY sample in it, such as:
> destination hosts { file("/var/log/syslogs/$HOST/$FACILITY"
> owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes));};
>
> but my purpose is not to log these message into a file named
> as FACILITY, but to include this FACILITY in my log files,
> for example:
> Jun 25 20:53:34 c890f12ec07 local6:warn|warning c890f12ec07
> root: sunjing test 1
>
> "local6:warn" is what I wanted in the log file....could you help?
Sorry, I forgot that the doc doesn't provide too much details about
macro usage. You can use these macros in templates too, for example:
destination d_something {
file( "/var/log/something"
template("$ISODATE $FACILITY:$PRIORITY $MSG\n";
);
};
Regards,
Sandor
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does
not intend to waive confidentiality or privilege. Use of this email is
prohibited when received in error.
______________________________________________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20080630/a91f0658/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://lists.balabit.hu/pipermail/syslog-ng/attachments/20080630/a91f0658/attachment-0003.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic15212.gif
Type: image/gif
Size: 1255 bytes
Desc: not available
Url : http://lists.balabit.hu/pipermail/syslog-ng/attachments/20080630/a91f0658/attachment-0004.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://lists.balabit.hu/pipermail/syslog-ng/attachments/20080630/a91f0658/attachment-0005.gif
More information about the syslog-ng
mailing list