On Thu, 9 Sep 2021, Yuri Bushmelev via rsyslog wrote:
Please consider to stop useing the $ThisConfigSyntaxStyle as "it will make
your life miserable" (c) Reiner Gerhards .. There is nice new syntax made
more than 10 years ago.
please explain why
template(name="TmplVPXMsg" type="string"
string="/var/log/remote/netscaler/%HOSTNAME%/netscalerlog")
is better than
$template TmplAuthpriv, "/var/log/remote/%HOSTNAME%/secure"
or why
action(type="omfile" file="/var/log/remote/netscaler/netscalerlog")
is better than
/var/log/remote/netscaler/netscalerlog
it gets a bit closer when you compare
action(type="omfile" dynaFile="TmplNetscalerMsg")
with
?TmplNetscalerMsg
but only because of the ?
Now, I agree that if you are doing more complex things, the new syntax is
better, but for simple things the old syntax is frequently as good or better.
When the new syntax was introduced, Reiner was thinking that the old syntax
would be phased out, but with further disucssion and examples, he changed his
mind because simple things are so much simpler in the old syntax.
if your config requires setting one thing to affect a future line, you are
probably better off doing it in a single line with the new syntax.
The new template() and action() syntax allow a lot of options that don't exist
with the old format (and names in the action() syntax can be incredibly
valuable when debugging things), but if you aren't doing complex things, the old
syntax can be btter due to it's brevity.
David Lang
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.