Forum Discussion
Josiah_39459
Apr 11, 2016Historic F5 Account
So it sounds like you only want to send the log when "CustomerID" is actually found. So do your
set resp_custID [findstr [HTTP::payload] "CustomerID"
first and then check if { $resp_custID ne "" } {
before logging.- Josiah_39459Apr 11, 2016Historic F5 AccountAlso if you want to be really elegant and don't want to check EVERY http payload, you can set a flag in HTTP_REQUEST when the appropriate uri is requested and unset it when it's not and then only send your logs if that flag is set.
- Basil_Parsley_1Apr 11, 2016NimbostratusSo it sounds like you only want to send the log when "CustomerID --- True ;-) I will look to use the if statement .... My main knowledge gap here is that I do not know how to perform the logic that says - Take the next 8 digits following string and put these in a log. Could I use skip_count ; if so what would be the syntax?
- Josiah_39459Apr 11, 2016Historic F5 AccountThe examples here don't help? https://clouddocs.f5.com/api/irules/findstr.html ---------------------------------------------------------------------------------------- [findstr [HTTP::payload] "" 12 ""]