Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Added request logging #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HeinrichHartmann
Copy link
Contributor

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.

@jech
Copy link
Owner

jech commented Sep 6, 2014

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

@jech jech closed this Sep 6, 2014
@leggewie
Copy link

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.

@jech
Copy link
Owner

jech commented Jul 14, 2015

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

@jech jech reopened this Jan 22, 2016
@jech
Copy link
Owner

jech commented Jan 22, 2016

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

@HeinrichHartmann
Copy link
Contributor Author

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

@antoniobeyah
Copy link

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.

@HeinrichHartmann
Copy link
Contributor Author

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

@jech
Copy link
Owner

jech commented Mar 23, 2016

@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.

@erji44
Copy link

erji44 commented Aug 22, 2016

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants