<html><body>
<p>Thank you so much, Sandor.<br>
<br>
I will try this method today, and let you know the result..<br>
<br>
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.<br>
<br>
<br>
<br>
<img width="16" height="16" src="cid:1__=C7BBFEEBDFC588A88f9e8a93df938@cn.ibm.com" border="0" alt="Inactive hide details for "Geller, Sandor \(IT\)" <Sandor.Geller@morganstanley.com>">"Geller, Sandor \(IT\)" <Sandor.Geller@morganstanley.com><br>
<br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td style="background-image:url(cid:2__=C7BBFEEBDFC588A88f9e8a93df938@cn.ibm.com); background-repeat: no-repeat; " width="40%">
<ul>
<ul>
<ul>
<ul><b><font size="2">"Geller, Sandor \(IT\)" <Sandor.Geller@morganstanley.com></font></b><font size="2"> </font><br>
<font size="2">Sent by: syslog-ng-bounces@lists.balabit.hu</font>
<p><font size="2">2008-06-30 23:41</font>
<table border="1">
<tr valign="top"><td width="168" bgcolor="#FFFFFF"><div align="center"><font size="2">Please respond to<br>
"Syslog-ng users' and developers' mailing list"        <syslog-ng@lists.balabit.hu></font></div></td></tr>
</table>
</ul>
</ul>
</ul>
</ul>
</td><td width="60%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:3__=C7BBFEEBDFC588A88f9e8a93df938@cn.ibm.com" border="0" alt=""><br>
<div align="right"><font size="2">To</font></div></td><td width="100%"><img width="1" height="1" src="cid:3__=C7BBFEEBDFC588A88f9e8a93df938@cn.ibm.com" border="0" alt=""><br>
<font size="2">"'Syslog-ng users' and developers' mailing list'" <syslog-ng@lists.balabit.hu></font></td></tr>
<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:3__=C7BBFEEBDFC588A88f9e8a93df938@cn.ibm.com" border="0" alt=""><br>
<div align="right"><font size="2">cc</font></div></td><td width="100%"><img width="1" height="1" src="cid:3__=C7BBFEEBDFC588A88f9e8a93df938@cn.ibm.com" border="0" alt=""><br>
</td></tr>
<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:3__=C7BBFEEBDFC588A88f9e8a93df938@cn.ibm.com" border="0" alt=""><br>
<div align="right"><font size="2">Subject</font></div></td><td width="100%"><img width="1" height="1" src="cid:3__=C7BBFEEBDFC588A88f9e8a93df938@cn.ibm.com" border="0" alt=""><br>
<font size="2">Re: [syslog-ng] logging facility in log file</font></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="58"><img width="1" height="1" src="cid:3__=C7BBFEEBDFC588A88f9e8a93df938@cn.ibm.com" border="0" alt=""></td><td width="336"><img width="1" height="1" src="cid:3__=C7BBFEEBDFC588A88f9e8a93df938@cn.ibm.com" border="0" alt=""></td></tr>
</table>
</td></tr>
</table>
<br>
<tt>Hi,<br>
<br>
> Thank you, Sandor.<br>
><br>
> I have read the syslog-ng documentation, and only found a<br>
> FACILITY and PRIORITY sample in it, such as:<br>
> destination hosts { file("/var/log/syslogs/$HOST/$FACILITY"<br>
> owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes));};<br>
><br>
> but my purpose is not to log these message into a file named<br>
> as FACILITY, but to include this FACILITY in my log files,<br>
> for example:<br>
> Jun 25 20:53:34 c890f12ec07 local6:warn|warning c890f12ec07<br>
> root: sunjing test 1<br>
><br>
> "local6:warn" is what I wanted in the log file....could you help?<br>
<br>
Sorry, I forgot that the doc doesn't provide too much details about<br>
macro usage. You can use these macros in templates too, for example:<br>
<br>
destination d_something {<br>
file( "/var/log/something"<br>
template("$ISODATE $FACILITY:$PRIORITY $MSG\n";<br>
);<br>
};<br>
<br>
Regards,<br>
<br>
Sandor<br>
--------------------------------------------------------<br>
<br>
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.<br>
______________________________________________________________________________<br>
Member info: </tt><tt><a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a></tt><tt><br>
Documentation: </tt><tt><a href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a></tt><tt><br>
FAQ: </tt><tt><a href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</a></tt><tt><br>
<br>
</tt><br>
</body></html>