-
Notifications
You must be signed in to change notification settings - Fork 21
Add logging parameters support #149
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
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| {% if candlepin_loggers %} | ||
| {% for logger, log_level in candlepin_loggers.items() %} | ||
| log4j.logger.{{ logger }}= {{ log_level }} |
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.
No idea if it matters
| log4j.logger.{{ logger }}= {{ log_level }} | |
| log4j.logger.{{ logger }}={{ log_level }} |
| - json | ||
| foreman_loggers: | ||
| help: Enable specific loggers for debugging Foreman. | ||
| candlepin_loggers: |
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.
Can we somehow tell obsah this is a dict? In kafo you can specify --candlepin-loggers logger1:value1 --candlepin-loggers logger2:value2 and that results in a single hash with 2 keys.
Same above for foreman_loggers
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 wondered the same thing. And wanted to see what @evgeni thought here on that as a type.
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.
What's the end data structure you expect here?
candlepin_loggers:
logger1: value1
logger2: value2
That?
With "regular ansible", you'd just pass that as JSON, so --candlepin-loggers '{"logger1":"value1","logger2":"value2"}'. Yes, not strictly userfriendly, I know.
Kafo (judging by Ewouds comment) does allow multiple params that then get joined to one big dict?
I am sure we can implement that, just not sure it's an actual improvement for the user (I guess for the "one entry case, the syntax is nicer, but once you have more… idk)
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 think JSON is fine for now.
53f7bc8 to
59947cf
Compare
Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
59947cf to
ec78402
Compare
| pulp_database_password: | ||
| help: Password for the Pulp database. | ||
| foreman_logging_level: | ||
| help: Set the log level for Foreman. |
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.
Question: Should we mention here in the help the default value, or is it enough to have it defined in the src/roles/foreman/defaults/main.yaml
| - info | ||
| - debug | ||
| foreman_loggers: | ||
| help: Enable specific loggers for debugging Foreman. |
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.
Should we list the choices the same way as we do for the foreman_logging_level?
This is the set of parameters from our docs around logging that are mentioned. I'm not 100% on whether we should include all of these so consider this a conversation starter.
This also raises a question -- what's the best strategy to test these kind of parameters? These take an input, change a settings file and then do have an affect on the log output.