Forum Discussion
Logging Variables
I think there's really two issues here, the first being why the XMLCBR event isn't firing, and the second being the missing variable. If you think about this from an atomic TCP session perspective, any event that is triggered within a given TCP session should have access to the variables set by previous events within that same TCP session, so barring any anomalies, is it safe to say that not every TCP session has an XML request in it? Or is it possible that a given XML request doesn't match your xpath criteria? In either case, the safest thing you could probably do is to make sure the variable exists before you try to access it.
if { [info exists id] } { log local0. "... $id ..." }
You could also apply try/catch logic, but that might be less intuitive than the above for the simple possibility of one missing variable. With the error avoided, you're free to troubleshoot the xpath, and it'd be interesting then to see if an XML request always precedes an LB selection in a TCP session. I'm still guessing not.
Recent Discussions
Related Content
* 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