polipo icon indicating copy to clipboard operation
polipo copied to clipboard

Added request logging

Open HeinrichHartmann opened this issue 11 years ago • 9 comments

Added logging of all requests in the following form $DATE - $METHOD - $URL of level INFO e.g.

2014-09-05 22:36:24 - GET - http://www.reddit.com/

Addresses #17.

Not sure if this is ready to merge.

HeinrichHartmann avatar Sep 05 '14 20:09 HeinrichHartmann

Rejected -- I'm not going to help lazy sysadmins spy on their users. (A competent sysadmin should be able to patch Polipo himself.)

jech avatar Sep 06 '14 12:09 jech

Thank you, Heinrich! I do not believe in security by obscurity and thus will consider to include this in Debian. I find the arguments brought forth to reject this functionality inconsistent and unconvincing.

leggewie avatar Jul 13 '15 07:07 leggewie

@leggewie if you include this in Debian, make sure you protect against buffer overflows in really_do_log_time.

jech avatar Jul 14 '15 22:07 jech

I've changed my mind. Reopening. (But please fix the issues with your patch.)

jech avatar Jan 22 '16 13:01 jech

Can you elaborate on the buffer overflow issue? I can not see a problem there.

HeinrichHartmann avatar Jan 23 '16 14:01 HeinrichHartmann

This is awesome, addresses part of my logging desires for . Two requests:

  1. Can you add in the response code?
  2. (Wishful thinking) Can you add in cache HIT/MISS to the line?

I understand 2 may be additional work and understand if you cannot add it. I may take up that work and submit a PR for the cache HIT/MISS.

Thanks for this PR, I merged them in to my local and they are working great.

antoniobeyah avatar Jan 31 '16 21:01 antoniobeyah

Sorry for the late reply. I'll look into this at the weekend.

HeinrichHartmann avatar Mar 03 '16 08:03 HeinrichHartmann

@HeinrichHartmann please check the result of strftime, and use strncat rather than relying on getting the size of the buffer right. Oh, and sizeof(char) is guaranteed to be 1.

jech avatar Mar 23 '16 23:03 jech

Any progress on including this on debian? Built polipo from source swapping files like for like didn't work, although compiled without errors, run ok but got connection refused from polipo.

erji44 avatar Aug 22 '16 23:08 erji44