-
Notifications
You must be signed in to change notification settings - Fork 898
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
Fix Default log level for automation log #17130
Fix Default log level for automation log #17130
Conversation
Prior to a7ed2cb, all loggers would have defaulted to `INFO` with or without the multicast logger. The bug that was fixed in that case is allowing the multicast logger to convert the logger into `DEBUG` mode. Unfortunately, two loggers weren't a part of the list of loggers that then have user settings applied to them to change their default log level: - $miq_ae_logger - $policy_log Since both have been assumed to be `INFO` in the past, this change makes that return to the previous behavior by default, and also has the added bonus of allowing the user to change these settings via the config. Of note, the $policy_log was not the original target of the BZ that prompted this change, but was added since it might also end up causing issues down the road. BZ link: https://bugzilla.redhat.com/show_bug.cgi?id=1553813
Ala Brandon
@miq-bot assign @gmcculloug |
@NickLaMuro Cannot apply the following label because they are not recognized: automation |
Checked commits NickLaMuro/manageiq@5fbb43e~...3626e94 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
|
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.
👍 I approve this alphabetical change
Wow... I hope @bdunne didn't get too excited about the alphabetical change and overlook the true intention of the PR 😏 |
No, I saw the full intent of the PR 😄 |
…ation_logger Fix Default log level for automation log (cherry picked from commit ca25c15) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553924
Backported this PR + #17136. Gaprindashvili backport details:
|
This PR introduces
level_automation
andlevel_policy
(not needed, will explain below)Vmdb::Logger.apply_config
on the$miq_ae_logger
and$policy_log
config/settings.yml
Vmdb::Logger.apply_config
Regarding the "not needed" part, the method
Vmdb::Logger.apply_config_value
method can actually be called without the config value be present in the config and still would default toINFO
, which is what we are looking for (this is already done with the$datawarehouse_log
for example). I was unaware of this until doing the second commit in this PR, so I could see a case of not adding these settings for simplicityAlso, the second commit is completely pedantic and optional (I have no problem rebasing it out if that is prefered), but I figured that @bdunne would have eventually done it at some point anyway, so I figured I would get it out of the way.
That said, I did leave the
evm.log
andrails.log
at the top since I figured that those were of more importance in most cases.Links
Steps for Testing/QA
If you run a automation task, the default log output should not show any
[DEBUG]
lines