log web page title in access.log

Asked by salim55 on 2014-09-07

hi

how i can log web page title in access.log by eCAP?

Question information

Language:
English Edit question
Status:
Answered
For:
eCAP Edit question
Assignee:
No assignee Edit question
Last query:
2014-09-07
Last reply:
2014-09-07
Alex Rousskov (rousskov) said : #1

You need to do three things:

1. Write a RESPMOD adapter that find "page titles" in HTTP response bodies. Note that not all HTTP responses contain "web pages" and that some "web pages" are delivered using multiple HTTP responses. This is the most complex part of the whole project. Please see the linked FAQ below for some of the reasons why it is not going to be easy, even though you are not going to modify the page.

2. Teach the adapter to report the found page title via eCAP adapter transaction options (a.k.a., metadata). See the libecap::Options API and search Answers for more information about it if needed.

3. Configure your host application to log transaction metadata from #2 to access log. For example, in Squid this can be done using %note logformat field.

FAQ #1793: “Can I inject ads into pages?”.

Can you help with this problem?

Provide an answer of your own, or ask salim55 for more information if necessary.

To post a message you must log in.