Re: [EXTERNAL] Re: Value is dropped or unset in resolved destination template

"Faine, Mark R. (MSFC-IS40)[NICS]" <[email protected]>
Newsgroups gmane.comp.syslog-ng
Message-ID <SA1PR09MB8253E7F0753F27E2C0AA1FFBE9189@SA1PR09MB8253.namprd09.prod.outlook.com>
Thanks, I understand.  It's just hard sending this kind of stuff without potentially inadvertently sharing something I'm not supposed to.   Either way, I think I have worked around the issue.

-Mark

-----Original Message-----
From: syslog-ng <[email protected]> On Behalf Of Fabien Wernli
Sent: Wednesday, March 23, 2022 09:05
To: Syslog-ng users' and developers' mailing list <[email protected]>
Subject: [EXTERNAL] Re: [syslog-ng] Value is dropped or unset in resolved destination template

Hi Mark,

It's really hard to tell what's happening without seeing your full
configuration. Remember messages can go through multiple logpaths, some of
which the variables are probably empty in.

That being said, if I were you I'd use a default value for your macros in any
case, much safer e.g.:

    destination d_default {
            file("`BASEPATH`/${location:-hidden}/$(lowercase ${HOST})/${app:-unknown}/$(lowercase ${HOST})_${app:-unknown}.log"
            create_dirs(yes)
            flags("threaded", "no-multi-line"));
    };
 
______________________________________________________________________________
Member info: https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.balabit.hu%2Fmailman%2Flistinfo%2Fsyslog-ng&amp;data=04%7C01%7Cmark.faine%40nasa.gov%7Cdf3b7016170246b9e56f08da0cd649bf%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637836411758844542%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=ALqH3MyXmGYAeqms%2FZusFf1CATjfyvt6sqwVc7Hta5E%3D&amp;reserved=0
Documentation: https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fsupport%2Fdocumentation%2F%3Fproduct%3Dsyslog-ng&amp;data=04%7C01%7Cmark.faine%40nasa.gov%7Cdf3b7016170246b9e56f08da0cd649bf%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637836411758844542%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=9ytDQzSFwkdc1QeC%2B8Y3tTCQoZLdgeh586YrHscdhVQ%3D&amp;reserved=0
FAQ: https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fwiki%2Fsyslog-ng-faq&amp;data=04%7C01%7Cmark.faine%40nasa.gov%7Cdf3b7016170246b9e56f08da0cd649bf%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637836411758844542%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=fD7jsZOiRMyM8vJpr3GcWbcNVdR8Guieerhuepjy3Ss%3D&amp;reserved=0

______________________________________________________________________________
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.