[syslog-ng][PATCH] syslog-ng-1.6.5+20041206 fixes missing facility/priority in afinet.c

Roberto Nibali syslog-ng@lists.balabit.hu
Wed, 08 Dec 2004 20:49:47 +0100


Hello,

Somehow we either forgot this piece or it dropped out of the CVS again ;). The 
inlined patch fixes a missing facility/priority addition for template expansion 
over the network in afinet.c

The goal is to be able to send the node name in each syslog message in order to 
distinguish the two systems: unfortunately when using templates in destination 
files, the facility/priority is lost.

This fixes it I hope:

--- syslog-ng-1.6.5+20041206/src/afinet.c       2004-08-05 13:35:12.000000000 +0200
+++ syslog-ng-1.6.5+20041206-fixed/src/afinet.c 2004-12-08 20:44:15.000000000 +0100
@@ -595,7 +595,8 @@
                 struct ol_string *msg_line;

                 if (self->template_output) {
-                       msg_line = c_format("%fS",
+                       msg_line = c_format("<%i>%fS",
+                                           msg->pri,
                                             expand_macros(
                                                     self->cfg,
                                                     self->template_output,


I'm under the distinct impression that something like that has already been 
addressed in the past. Maybe it was a copy'n'paste error or so ...

Take care,
Roberto Nibali, ratz
-- 
-------------------------------------------------------------
addr://Rathausgasse 31, CH-5001 Aarau  tel://++41 62 823 9355
http://www.terreactive.com             fax://++41 62 823 9356
-------------------------------------------------------------
terreActive AG                       Wir sichern Ihren Erfolg
-------------------------------------------------------------