Skip to content

Modify log file location#19

Open
pinpang wants to merge 4 commits into
drohm:masterfrom
pinpang:master
Open

Modify log file location#19
pinpang wants to merge 4 commits into
drohm:masterfrom
pinpang:master

Conversation

@pinpang
Copy link
Copy Markdown
Contributor

@pinpang pinpang commented Feb 16, 2022

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

Copy link
Copy Markdown
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.

Comment thread pi_sht1x/logging.py Outdated
@@ -1,9 +1,10 @@
from os import path
import os
Copy link
Copy Markdown
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.

Comment thread pi_sht1x/logging.py
"""
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
Copy Markdown
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.

2 participants