3.7.29. DefineFormattedGlobalVar Previous topic Parent topic Child topic Next topic

Defines a value for a global variable that can be accessed anywhere special formatting characters are permitted. The syntax is:
DefineFormattedGlobalVar variablename value
This example defines the global variable called "variablename" to be the string “value”. The value can be accessed where special formatting characters are permitted with %{GlobalVar:variablename}.
Within value, special formatting characters are permitted, so you can have one global variable that depends on another global variable.
In the following example, the log file will be called “./detail-server1”:
DefineFormattedGlobalVar servername server1
LogFile ./detail-%{GlobalVar:servername}