Value is dropped or unset in resolved destination template

"Faine, Mark R. (MSFC-IS40)[NICS]" <[email protected]>
Newsgroups gmane.comp.syslog-ng
Message-ID <SA1PR09MB825359B283BF51B3031A18FDE9179@SA1PR09MB8253.namprd09.prod.outlook.com>
I have a destination template in my destination (d_default) that uses $location

destination d_default {
        file("`BASEPATH`/$location/$(lowercase ${HOST})/$app/$(lowercase ${HOST})_$app.log"
        create_dirs(yes)
        flags("threaded", "no-multi-line"));
      };



That is set by a series of filters that look like this

log {
  if {
   filter...
   rewrite {
     set("foo" value("location"));
   };
};
  if {
   filter...
   rewrite {
     set("bar" value("location"));
   };
};

...

};

This appears to be working, I can see it in the logs:

Setting value; name='location', value='unknown', msg='0x7f190c001e00'  # Unknown is a default value that would be appropriate on this testing server

Later additional log paths are applied like so:

log { source(default); filter(f_asa); rewrite(r_asa); destination(d_default); flags(final ); };

...
log { source(default); filter(f_fw); rewrite(r_fw); destination(d_default); flags(final ); };
...


However, when I go to the destination on the filesystem the location is empty so the files are being written as though location was this:
("`BASEPATH`//$(lowercase ${HOST})/$app/$(lowercase ${HOST})_$app.log"


Any ideas what could be causing this?

Thanks,
Mark
______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.balabit.com/wiki/syslog-ng-faq
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.