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...
Syafiq_89483
Cirrus
Feb 26, 2014Can you try this?
when RULE_INIT {
set static::debug 1
}
when CLIENT_ACCEPTED {
set logdebug $static::debug
if {$logdebug} {
log local0.info "Client Connected, IP: [IP::client_addr], pool [LB::server pool]"
}
}
when HTTP_REQUEST {
if {$logdebug} {
log local0.info "Client IP IP: [IP::client_addr], host [HTTP::host]"
}
}
when LB_SELECTED {
if {$logdebug} {
log local0.info "in LB_SELECTED, IP [IP::client_addr]:[TCP::client_port], node [LB::server addr], pool [LB::server pool]"
}
}
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