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

Permissions issue b/c of logging to python package folder #27

Open
cwhatley opened this issue Aug 4, 2021 · 0 comments
Open

Permissions issue b/c of logging to python package folder #27

cwhatley opened this issue Aug 4, 2021 · 0 comments

Comments

@cwhatley
Copy link

cwhatley commented Aug 4, 2021

If, for example, you have installed the package as root and run as another user, you can't start up anything using this code b/c it is trying to log to a subfolder of the package install directory.

Would be good to eliminate this or have it fail gracefully.

print("Will log to: {}".format(log_path))
if not os.path.exists(log_path):
os.mkdir(log_path)
fileHandler = logging.FileHandler("{0}/{1}.log".format(log_path, 'dj-dna-streaming-python'))

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

No branches or pull requests

1 participant