<p dir="ltr">It came in with blocks and scl support. So if your version has support for the system driver it will support this as well. My memories are vague with 3.2.</p>
<p dir="ltr">Environment variables are resolved at parsing time and should work like this:</p>
<p dir="ltr">Template("template ‘envvar‘")</p>
<p dir="ltr">It works as if the environment variable was right there in the config file.</p>
<div class="gmail_quote">On Sep 21, 2014 3:14 PM, <<a href="mailto:jetjnkr@gmail.com">jetjnkr@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Balazs,<br>
<br>
Thanks, do you have any examples in using the backtick it in a message template? Do you have to assign it to a config variable in a "define" first?<br>
<br>
How much 'earlier' versions of syslog-ng will this work (e.g. before 3.2 ?)<br>
<br>
Jim.<br>
<br>
<br>
><br>
><br>
> From: Balazs Scheidler <<a href="mailto:bazsi77@gmail.com">bazsi77@gmail.com</a>><br>
> Subject: Re: [syslog-ng] Injecting environment variables?<br>
> To: "Syslog-ng users' and developers' mailing list"<br>
> <<a href="mailto:syslog-ng@lists.balabit.hu">syslog-ng@lists.balabit.hu</a>>, <a href="mailto:wernli@in2p3.fr">wernli@in2p3.fr</a><br>
> Message-ID:<br>
> <<a href="mailto:CAKcfE%2BZKqqPnPOOSJek81eq_EPa7y3jUrPyKYH94jc3mxvPsmg@mail.gmail.com">CAKcfE+ZKqqPnPOOSJek81eq_EPa7y3jUrPyKYH94jc3mxvPsmg@mail.gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> Earlier you could use the backtick env variable format.<br>
><br>
> This one is substituted at config parsing.<br>
> On Sep 18, 2014 5:26 PM, "Fabien Wernli" <<a href="mailto:wernli@in2p3.fr">wernli@in2p3.fr</a>> wrote:<br>
><br>
>> Hi Jim,<br>
>><br>
>> As of version 3.5 you can use the `env` template function:<br>
>><br>
>> template("<$PRI> $DATE $HOST $MSG $(env <environment-variable>) \n")<br>
>> template_escape(no));<br>
>><br>
>> Cheers<br>
>><br>
>><br>
>> ______________________________________________________________________________<br>
>> Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
>> Documentation:<br>
>> <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
>> FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
>><br>
>><br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <a href="http://lists.balabit.hu/pipermail/syslog-ng/attachments/20140920/c41f4430/attachment.html" target="_blank">http://lists.balabit.hu/pipermail/syslog-ng/attachments/20140920/c41f4430/attachment.html</a><br>
><br>
> ------------------------------<br>
><br>
> _______________________________________________<br>
> syslog-ng maillist - <a href="mailto:syslog-ng@lists.balabit.hu">syslog-ng@lists.balabit.hu</a><br>
> <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
><br>
><br>
> End of syslog-ng Digest, Vol 113, Issue 11<br>
> ******************************************<br>
<br>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>