Forum Discussion
Bill_Chipman_10
Nimbostratus
Feb 18, 2015Add a cookie value to request log template?
Is there a way to include the value of a cookie in the request log profile? I'm looking to replace the ${_COOKIE} variable in my request logs.
3 Replies
- StephanManthey
Nacreous
Hi Bill,
I cannot help right now with the request log profile. But perhaps an iRule will do the job as well for you? The following one would just log each cookie including value found in the request:when HTTP_REQUEST { if { [HTTP::header exists "Cookie"] } { foreach cookiename [HTTP::cookie names] { log local0. "cookie <$cookiename> value: [HTTP::cookie value $cookiename]" } } }Thanks, Stephan
- Bill_Chipman_10
Nimbostratus
The solution was hidden in the documentation. You just have to include a variable $Cookies in the access log template. This displays ALL cookies in the log. Met my requirements.
- Bill_Chipman_10
Nimbostratus
Sorry, variable is $Cookie.
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