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 { ...
krisdames
Cirrus
Apr 19, 2013I also just learned this interesting tidbit:
The only time this becomes even slightly confusing is when setting variables in the RULE_INIT event. All variables set under this event are treated as global, so keep that in mind. The same commands may be used against either local or global variables, though, so keep an eye out.
Source: https://devcentral.f5.com/tech-tips/articles/irules-101-03-variables
So not only should I not use the static namespace but I need a unique variable name if I want to initialize it in the RULE_INIT event, because even if I try to use a local variable it will actually be a global variable!
--
Kris
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