<div dir="ltr"><div><div>Hi Mark,<br><br>Fabien is right, you should have a default value.<br>You are using the rewrite rules that set $location inside an if statement.<br>Maybe what happens is that in some cases a log doesn't match which leads to an unset $location.<br></div>Don't you have directories with $location's value too?<br></div><div>So you have both:<br>
("`BASEPATH`//$(lowercase ${HOST})/$app/$(lowercase ${HOST})_$app.log"</div><div>("`BASEPATH`/$location/$(lowercase ${HOST})/$app/$(lowercase ${HOST})_$app.log"</div><div><br></div><div>Or $location is always empty on the destination side?</div><div><br></div>Gabor<br><div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Fabien Wernli <<a href="mailto:wernli@in2p3.fr">wernli@in2p3.fr</a>> ezt írta (időpont: 2022. márc. 23., Sze, 15:04):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Mark,<br>
<br>
It's really hard to tell what's happening without seeing your full<br>
configuration. Remember messages can go through multiple logpaths, some of<br>
which the variables are probably empty in.<br>
<br>
That being said, if I were you I'd use a default value for your macros in any<br>
case, much safer e.g.:<br>
<br>
    destination d_default {<br>
            file("`BASEPATH`/${location:-hidden}/$(lowercase ${HOST})/${app:-unknown}/$(lowercase ${HOST})_${app:-unknown}.log"<br>
            create_dirs(yes)<br>
            flags("threaded", "no-multi-line"));<br>
    };<br>
<br>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>