You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
for better error analysis, it would be great if the output from the console could be saved to a file at the same time in debug mode.
Describe alternatives you've considered
it only requires a one-liner in the code shown below
diff --git a/pytr/utils.py b/pytr/utils.py
index c235a42..5f9e21d 100644
--- a/pytr/utils.py+++ b/pytr/utils.py@@ -32,6 +32,8 @@ def get_logger(name=__name__, verbosity=None):
logger.propagate = False
if log_level == 'debug':
+ # (over)write logs to file+ logging.basicConfig(filename='debug.log', filemode='w+', level=logging.DEBUG)+ # need logs from other classes+ logger.propagate = True
fmt = '%(asctime)s %(name)-9s %(levelname)-8s %(message)s'
datefmt = '%Y-%m-%d %H:%M:%S%z'
else:
thanks
The text was updated successfully, but these errors were encountered:
Especially the logger.propagate seems mostly interesting when trying to debug connection issues. Not sure, that this is a generally advisable setting. Regarding the overall idea to log to a file, why not use the typical command line approach of redirecting the output?
a debug option would be nice if the application can write everything to a log file for me. then I don't have to worry about output forwarding myself. Otherwise, you can of course forward the output yourself, that's true. That would be a home-made solution without having to modify anything in the application.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
for better error analysis, it would be great if the output from the console could be saved to a file at the same time in debug mode.
Describe alternatives you've considered
it only requires a one-liner in the code shown below
thanks
The text was updated successfully, but these errors were encountered: