0

I want to log a cookie value from response in Apache. How can I do that. The closest option is

Logformat "%{Set-Cookie}o"

this logs all cookies in response.

How can I extract a particular cookie value & log it?

Mohit Kanwar
  • 2,962
  • 7
  • 39
  • 59
Da_Vicki
  • 91
  • 1
  • 8
  • Possible duplicate of [How to log some RESTful service response information apache log file?](https://stackoverflow.com/questions/11038969/how-to-log-some-restful-service-response-information-apache-log-file) – Paul Sweatte Sep 26 '17 at 03:44

2 Answers2

1

Use the C format string to log a cookie, such as this:

Logformat "%{Foobar}C"

to log the contents of cookie Foobar.

References

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265
1
Logformat "%{Foobar}C"

This works with request only. If there is a new cookie being set in the response, this will NOT pick that up.

Yuga
  • 21
  • 2