Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging Directory <> Working Directory #189

Closed
joebosse opened this issue Sep 8, 2023 · 4 comments
Closed

Logging Directory <> Working Directory #189

joebosse opened this issue Sep 8, 2023 · 4 comments

Comments

@joebosse
Copy link

joebosse commented Sep 8, 2023

I use px-proxy on Linux. Awesome tool by the way ;-). I've installed the python package and configured a systemd service unit with systemctl edit --full --force --user px.service because I want to use it in my user space only. So I generated the config file and configured the service as follows:

[Unit]
Description=Local Proxy

[Service]
WorkingDirectory=/home/user
ExecStart=/usr/local/bin/px --config=/home/user/.config/px.ini

[Install]
WantedBy=default.target

After setting debug to 1 I got an error. The program wanted to log into /usr/local/bin/ where the script file is located. That is not exactly what py --help says. It works only in combination with --uniqlog as expected.

joebosse pushed a commit to joebosse/px that referenced this issue Sep 8, 2023
@genotrance
Copy link
Owner

Need to add a new user configurable cli flag / config file option.

@genotrance
Copy link
Owner

genotrance commented Nov 30, 2023

--log already exists so extending this to support more use cases.

--log=1 = current behavior - log to the script directory - same as --debug
--log=2 = log to the working directory
--log=3 = log to unique file in working directory - same as --uniqlog
--log=4 = log to stdout - same as --verbose

Given --debug, --verbose and --uniqlog are not currently supported by env vars or config file, the above behavior will enable more flexibility. Open to feedback.

@genotrance
Copy link
Owner

This is fixed in v0.9.0 still in development - see branch.

@genotrance
Copy link
Owner

v0.9.0 has been released.

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

No branches or pull requests

2 participants