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.
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
Added support for AWS Credentials profiles and enhanced Ctrl-C handling #8
base: master
Are you sure you want to change the base?
Added support for AWS Credentials profiles and enhanced Ctrl-C handling #8
Changes from 1 commit
a3bd618
8cd7a3b
79b8a4b
9b4cfc2
21cbc5b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we can move the
manager
andstop_signal
variables to a different scope? Using variables with global scope should be avoided as much as possible.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which particular scope would you think of?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where you wrote:
global STOP_SIGNAL
Replace with:
And remove the old
MANAGER
andSTOP_SIGNAL
. Did not check if that works, please confirm :-)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the others changed from
info
todebug
, maybe this one should bedebug
too?I'm not sure why you changed some of the calls from
logger.info
tologger.debug
but I'll trust you on those changes and that the whole tool will use the same "rules" to decide what is info and what is debug.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So right, I've seen that running the tool by default on verbose output is fine to the general UX, but as soon as iam's get-account-authorization-details results gets dumped, they will generate such a big JSON that would effectively make reading program's output cumbersome. So I started using
logger.debug
anywhere we've been dumping JSON contents. Whereas policy's name does not affect programs output to the point of making it being of adebug
level.If we wish to have the user know what's going on during program's non-verbose execution, then we shall go with
logger.info
only for essential or short enough outputs. Should a user want to learn more what the program learns as it goes,debug
would provide him with all we've got to say there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally agree with your decision, lets keep it like that:
debug
contains JSON,info
contains short messages.Just one more thing: for the places where you removed the
logger.info()
, is there a short message we could use? For example:Could still be
info
.