Rafficer / linux-cli-community

Linux command-line client for ProtonVPN. Written in Python.
https://protonvpn.com
GNU General Public License v3.0
1.29k stars 195 forks source link

[Enhancement] Add option to disable or redirect logging #206

Open njfox opened 4 years ago

njfox commented 4 years ago

Is your feature request related to a problem? Please describe. I ported this package to use on my OpenWRT router, but I've run into an issue where the log files for pvpn and openvpn get massive and run the router out of disk space, since the RW /overlay partition on most routers is very small (often less than 10mb). After monitoring this for a few days, it looks like the ovpn.log file grows by about 3-5mb every 24 hours, so at this rate I have to kill the service and delete the file every 2-3 days to keep it from filling up the writable partition.

Describe the solution you'd like It would be nice to add a config option to specify where logs get written to or disable them entirely.

njfox commented 4 years ago

I was able to work around the pvpn-cli.log by setting the log level to CRITICAL, but it looks like connection.py depends on the output from the openvpn log to do various checks, which is a little messier to deal with since I may not be able to just patch it out. Any suggestions for a workaround?

update: silencing replay warnings with --mute-replay-warnings has eliminated the majority of the log spam, so they seem to be a manageable size now. Planning to keep this issue open though since being able to specify the log location would be a helpful feature in situations like these.