Forum Discussion
krisdames
Cirrus
Apr 19, 2013Conditional logging
Hi,
I typically put this at the top of all my irules (learned it from the F5 consultant that set up our BigIP). This allows me to easily turn debugging on and off:
when RULE_INIT { ...
Kevin_Stewart
Employee
Apr 19, 2013True statement about RULE_INIT variables. The biggest difference is how the variables are stored and accessed. The static namespace is specifically designed for CMP-compatibility - meaning the variables will be accessible across TMM instances. A non-static global variable is not only not CMP-capable, but will likely demote the entire virtual server to a single TMM (not good for performance). So static global variables can be a good thing, if used properly.
By the way, while they are intended to be read-only once set, you can change a static global variable outside of RULE_INIT, but doing so will break CMP for that variable.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects