-
Notifications
You must be signed in to change notification settings - Fork 196
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
Make temporary folder (for logs) cross-platform #2501
Comments
Thanks for filing @softvision-oana-arbuzov! I'll take a stab at this. |
Changing the title a bit... |
Fixes #2501 - Make temporary logfile location platform independent.
@miketaylr and @karlcow some little updated for In def getTempPath():
return "temp" if sys.platform is "win32" else "tmp"
LOG_FILE = os.path.join(getTempPath(), '/webcompat.log')
LOG_FMT = '%(asctime)s tracking %(message)s'
CSP_REPORTS_LOG = os.path.join(getTempPath(), '/webcompat-csp-reports.log') Please review. |
The code looks good, but I'm not sure it's needed. The current approach is to create a Does that make sense? Or is it failing for you as-is on the latest master? |
(or, it could be |
yes in this case, I don't think it matters. This is just a location to save the file. Plus having two different names for |
@miketaylr and @karlcow that sounds good too, I will update my files and check again if it works on Windows. |
Environment:
Operating System: Windows 10 Pro
Steps to Reproduce:
Expected Behavior:
Logs point out to "temp" folder for Windows and "tmp" for Linux/Mac.
Actual Behavior:
Logs point out to "tmp" folder.
Note:
__init__.py
file fromConfig
folder (C:\\tmp\\webcompat.log
) is "temp" folder on Windows;The text was updated successfully, but these errors were encountered: