proxy.py
proxy.py copied to clipboard
[AccessLogs] Not available on Windows
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:
- Install proxy.py
- Run "proxy"
- Run a test connection via the proxy
- 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?
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.
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.
i ahve the same problem with windows 10 and python 3.10 and proxy.py 2.4.3 dist. please help to solve ,thanks
excuse me it should be:i have the same problem....