Forum Discussion
Rafael_255098
Mar 28, 2016Nimbostratus
How to save only some fields from payload?
Hello,
I need log, in a single line, some informations from Header and some from payload. For this I wrote the iRule below that already saves the header fields correctly, now I need to save only th...
- Mar 28, 2016
Yes, easily. Just add a conditional around this part:
log local0. $LogString log local0. "[lindex $params 0] : [lindex $params 1]"
Like
if { [lindex $params 0] eq 'txtLogin' or [lindex $params 0] eq 'gpnEnviarPor' } { log local0. $LogString log local0. "[lindex $params 0] : [lindex $params 1]" }
Josiah_39459
Mar 28, 2016Historic F5 Account
Yes, easily. Just add a conditional around this part:
log local0. $LogString
log local0. "[lindex $params 0] : [lindex $params 1]"
Like
if { [lindex $params 0] eq 'txtLogin' or [lindex $params 0] eq 'gpnEnviarPor' } {
log local0. $LogString
log local0. "[lindex $params 0] : [lindex $params 1]"
}
- Rafael_255098Mar 28, 2016NimbostratusThanks Josiah, it works well, but I need to log all information (header and payload) in a single line. Do you know any way to do this?
- Josiah_39459Mar 28, 2016Historic F5 AccountYes. If you want to put it in a single line. Instead of "logging" them immediately (which creates new lines), "append" them to a string variable, and then after and outside the for loop, log that single string variable only once.
- Rafael_255098Mar 29, 2016NimbostratusThanks again Josiah, now it works!!!
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