<HTML>
<HEAD>
<TITLE>Rewrite facility names of remote logs</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I&#8217;ve setup Syslog-NG to receive logs from other servers which have been configured as follows - <BR>
Tomcat servers are forwarding logs as facility6 to rsyslog, which then forwards to central log server. <BR>
Apache servers are forwarding logs as faility5 to rsyslog which then forwards to central log server. <BR>
<BR>
When I receive these logs on the central log server, they are written to files as their facility name, i.e. local6.$DAY. <BR>
Is there a way to change or re-write the facility name on the fly so that instead of local6.$DAY I can get the file written as tomcat.$DAY?<BR>
<BR>
Here is the configuration I&#8217;m using to store the logs - <BR>
<BR>
destination d_net {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;file(&quot;/var/log/hosts/$YEAR/$MONTH/$HOST/$FACILITY.$DAY&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;);<BR>
};<BR>
<BR>
log {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;source(s_net);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;destination(d_net);<BR>
};<BR>
</SPAN></FONT>
</BODY>
</HTML>