Forum Discussion
helenio
Nimbostratus
Feb 26, 2014local variable within same irule on all events
Hello,
I'd like to use a local variable to log all event within a certain irule.
Since now I have done like this:
when CLIENT_ACCEPTED {
set logdebug 1
if {$logdebug != 0} {log loc...
IheartF5_45022
Nacreous
Feb 26, 2014Personally I generally don't tend to use static variables - they are too subject to unexpected change from other irules 'accidentally' initialising the same variable. Think variable 'static::debug' - what crimes have been committed against that?
I tend to use CLIENT_ACCEPTED to initialise my variables - the overhead is negligible.
IheartF5_45022
Nacreous
Feb 26, 2014With caveat - except where variables are actually global in scope. Even then woul try to use session table if poss.
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