proxy.py icon indicating copy to clipboard operation
proxy.py copied to clipboard

[AccessLogs] Not available on Windows

Open notatallshaw opened this issue 3 years ago • 4 comments

Describe the bug

Using proxy.py 2.4.0 on Python 3.10 I do not see access log output on Windows 10 21H2, where as I do on Ubuntu 20.04.3 LTS.

To Reproduce Steps to reproduce the behavior:

  1. Install proxy.py
  2. Run "proxy"
  3. Run a test connection via the proxy
  4. No additional output to stdout is created

Expected behavior Expect to see access logs, such as on Ubuntu where I see the following:

2022-02-12 15:46:22,281 - pid:114 [I] server.access_log:384 - 127.0.0.1:36976 - GET google.com:80/ - 301 Moved Permanently - 528 bytes - 50.37ms

Version information

  • OS: Windows 10 21H2
  • proxy.py 2.4.0

Additional Notes

I notices looking through the latest release there was a big reworking that was supposed to fix access logs https://github.com/abhinavsingh/proxy.py/issues/473 . Perhaps I am misreading this and this work has not been applied to Windows yet?

notatallshaw avatar Feb 12 '22 20:02 notatallshaw

Hi @notatallshaw Thanks for reporting this. I think something keeps changing between Python versions and it breaks multiprocessing based log handlers. For now you can simply write a plugin and print() from within on_access_log method to get the desired result. I'll check into this on a Windows system.

abhinavsingh avatar Feb 14 '22 16:02 abhinavsingh

Thanks I'll do that, also if I get a bit of time I'll see if I can take a look myself. I remember facing similar issues myself in multi thread/proc environments.

notatallshaw avatar Feb 14 '22 17:02 notatallshaw

i ahve the same problem with windows 10 and python 3.10 and proxy.py 2.4.3 dist. please help to solve ,thanks

spereg53 avatar Aug 02 '22 20:08 spereg53

excuse me it should be:i have the same problem....

spereg53 avatar Aug 02 '22 20:08 spereg53