Added request logging
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.
Rejected -- I'm not going to help lazy sysadmins spy on their users. (A competent sysadmin should be able to patch Polipo himself.)
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 if you include this in Debian, make sure you protect against buffer overflows in really_do_log_time.
I've changed my mind. Reopening. (But please fix the issues with your patch.)
Can you elaborate on the buffer overflow issue? I can not see a problem there.
This is awesome, addresses part of my logging desires for . Two requests:
- Can you add in the response code?
- (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.
Sorry for the late reply. I'll look into this at the weekend.
@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.
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.