Bug #14480
--debug should probably be a global setting
| Status: | Accepted | Start date: | 05/14/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | - | |||
| Target version: | - | |||
| Affected Puppet version: | Branch: | |||
| Keywords: | ||||
Description
I have seen some code paths (e.g. in #load_actions in interface.rb in 2.7.x) where there are calls to “Puppet.debug” that are guaranteed to occur before the options are parsed (and thus, before the log level is set)—so those messages will never make it to a log, even if the user runs with “—debug”.
That particular line of code appears to have been removed (as that loading was ported over to use the autoloader), but I think this is probably a more general problem. We should probably move “—debug” to be a global setting and make sure that it is handled very early in the bootstrapping cycle. (For that matter, all of the logging initialization should probably be handled at that same point in time…)
Right now, several different applications (at least master, agent, and face_base) seem to decided individually whether or not to handle —debug and what to do with it.
History
#1
Updated by Kelsey Hightower about 1 year ago
- Status changed from Unreviewed to Accepted