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

Modify log file location #19

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Modify log file location #19

wants to merge 4 commits into from

Conversation

pinpang
Copy link
Contributor

@pinpang pinpang commented Feb 16, 2022

Move the log file from the module installation directory to the user HOME directory.

Copy link
Owner

@drohm drohm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you take a look at my two comments on the pi_sht1x/logging.py file? If you can fix those I'll get this merged and do another release. Apologies for the delay getting back to this.

@@ -1,9 +1,10 @@
from os import path
import os
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to use the previous import to scope the import to path, which is all we need here.

@@ -13,10 +14,11 @@ def create_logger(name):
in case there was a logger with the same name.
"""
logger = getLogger(name)
log_filename = path.join(path.dirname(path.realpath(__file__)), LOG_FILE_NAME)
log_filename = os.path.join(_get_log_folder(), LOG_FILE_NAME)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you change the import above you can change this to path.join.

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

Successfully merging this pull request may close these issues.

None yet

2 participants