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
I think the tool could benefit from fully implementing the logging module (https://docs.python.org/3/library/logging.html). I really like having the ability to control the amount of text that is returned to the console, especially for quickly identifying major problems and for debugging.
This could be done a number of ways, but at the minimum I would add a simple "debug" command line argument to turn on debug level logging (similar to how the gdal utilities work). I also like how the conda tools (install, update, etc.) have a "verbose" flag also (https://conda.io/docs/commands/conda-install.html) for quickly changing the level.
Within the code, you just have to determine what level each print statement is. For example, within image_download() the prints for "Authentication failed" and "CSRF_Token not found" should probably be at the error or critical level message, and I think the actual download URL should be returned at the debug level. In unzip_image(), the two print statements would probably be at the info level.
This is something I would be happy to make a branch for and start if you think it would help.
The text was updated successfully, but these errors were encountered:
cgmorton
changed the title
Consider implementing logging module and allowing user to specify
Consider implementing logging module and allowing user to specify logging level
Oct 24, 2017
I think the tool could benefit from fully implementing the logging module (https://docs.python.org/3/library/logging.html). I really like having the ability to control the amount of text that is returned to the console, especially for quickly identifying major problems and for debugging.
This could be done a number of ways, but at the minimum I would add a simple "debug" command line argument to turn on debug level logging (similar to how the gdal utilities work). I also like how the conda tools (install, update, etc.) have a "verbose" flag also (https://conda.io/docs/commands/conda-install.html) for quickly changing the level.
Within the code, you just have to determine what level each print statement is. For example, within image_download() the prints for "Authentication failed" and "CSRF_Token not found" should probably be at the error or critical level message, and I think the actual download URL should be returned at the debug level. In unzip_image(), the two print statements would probably be at the info level.
This is something I would be happy to make a branch for and start if you think it would help.
The text was updated successfully, but these errors were encountered: