<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 &quot;Geller, Sandor \(IT\)&quot; &lt;Sandor.Geller@morganstanley.com&gt;">&quot;Geller, Sandor \(IT\)&quot; &lt;Sandor.Geller@morganstanley.com&gt;<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">&quot;Geller, Sandor \(IT\)&quot; &lt;Sandor.Geller@morganstanley.com&gt;</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>
&quot;Syslog-ng users' and developers' mailing list&quot;        &lt;syslog-ng@lists.balabit.hu&gt;</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">&quot;'Syslog-ng users' and developers' mailing list'&quot; &lt;syslog-ng@lists.balabit.hu&gt;</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>
&gt; Thank you, Sandor.<br>
&gt;<br>
&gt; I have read the syslog-ng documentation, and only found a<br>
&gt; FACILITY and PRIORITY sample in it, such as:<br>
&gt; destination hosts { file(&quot;/var/log/syslogs/$HOST/$FACILITY&quot;<br>
&gt; owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes));};<br>
&gt;<br>
&gt; but my purpose is not to log these message into a file named<br>
&gt; as FACILITY, but to include this FACILITY in my log files,<br>
&gt; for example:<br>
&gt; Jun 25 20:53:34 c890f12ec07 local6:warn|warning c890f12ec07<br>
&gt; root: sunjing test 1<br>
&gt;<br>
&gt; &quot;local6:warn&quot; 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>
 &nbsp;file( &quot;/var/log/something&quot;<br>
 &nbsp; &nbsp;template(&quot;$ISODATE $FACILITY:$PRIORITY $MSG\n&quot;;<br>
 &nbsp;);<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>