Only at config parse time.

Regarding the back tick case, are you sure HOSTNAME is set for the syslog-ng process itself? Or is it only set for your interactive shell.

On Linux you can check this in proc, /proc/<pid>/env, but I guess similar exists on freebsd.

On Aug 29, 2016 6:17 PM, "Robert Blayzor" <rblayzor.bulk@inoc.net> wrote:
On Aug 29, 2016, at 11:38 AM, Evan Rempel <erempel@uvic.ca> wrote:
>
> @module confgen context(rewrite) name(r_myself) exec("/bin/hostname")


I guess the only remaining question on this is a performance one.

Would the exec be done for each and every log message or is it done only once?

--
Robert
inoc.net!rblayzor
XMPP: rblayzor.AT.inoc.net
PGP Key: 78BEDCE1 @ pgp.mit.edu
______________________________________________________________________________
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