main CLI: add logging control args + turn on traceback for exceptions#1020
Merged
yunjunz merged 2 commits intoinsarlab:mainfrom Jun 13, 2023
Merged
main CLI: add logging control args + turn on traceback for exceptions#1020yunjunz merged 2 commits intoinsarlab:mainfrom
yunjunz merged 2 commits intoinsarlab:mainfrom
Conversation
+ __main__: add `mintpy --loglevel / quiet / verbose / debug` options to control the logging level. + __main__: turn ON the traceback always in case of exceptions + __main__: add example usage for the mintpy CLI, consistent with other sub-commands
avalentino
approved these changes
Jun 10, 2023
scottstanie
approved these changes
Jun 12, 2023
|
|
||
| PROG = __package__ | ||
| LOGFMT = '%(asctime)s %(levelname)-8s -- %(message)s' | ||
| DEFAULT_LOGLEVEL = "WARNING" |
Contributor
There was a problem hiding this comment.
I'm just noticing that this is the only place where python logging is used- do we think it's worth putting on the todo-list or roadmap to switch over some/all of the print calls to either logging.info or logging.warning?
Member
Author
There was a problem hiding this comment.
Yes, it definitely should be on the list. Please feel free to edit them on the wiki (https://github.com/insarlab/MintPy/wiki).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
add
mintpy --loglevel / quiet / verbose / debugoptions to control the logging level, as suggested by @avalentino in Printing full traceback for exceptions #1017.always turn ON traceback in case of exceptions, as suggested by @scottstanie in Printing full traceback for exceptions #1017
add example CLI usage
#168
Reminders