-
Notifications
You must be signed in to change notification settings - Fork 2.5k
chore(terraform): option to pass in instanced logger #8738
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
Conversation
Allow use of instanced logger over the global default. Add unit test to attempt to catch any misuse of the global logger
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.
lgtm, thanks for the very detailed tests! @nikpivkin could you also take a look?
@Emyrk I think we will have to update the tests. |
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.
LGTM. Need to fix a assertion in one test after a logger update.
It seems that for nested modules the module attribute is repeated, which can be confusing:
What if module contains the full name of the module, for example, |
module path is also included in output logs now
My mistake, updated. The test is a nice example of the new
@nikpivkin I had thought about that too. We do not store the
|
I think we can tackle this in a future PR since we don't store the |
Description
Create new option
OptionWithLogger
to pass in an instanced logger, rather than using the global. By default, the global is still used.There is 1 behavior change. The key
module=<module_name>
is passed to the evaluator and other child components (like the resolver). I intentionally kept this, as it helps log the current scope of the recursive nature of the parsing.Eval logs before
Eval logs after
Checklist