On Wed, 2004-12-08 at 20:49, Roberto Nibali wrote:
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 ...
it was removed by intent, as that code path is processed when template() is specified by the user. if you want to include the pri/level then you need to add it into your template: destination d_udp { udp("1.2.3.4" template("<$TAG>$DATE $HOST $MSG\n"); }; -- Bazsi