The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #14480

--debug should probably be a global setting

Added by Chris Price over 2 years ago. Updated over 2 years ago.

Status:AcceptedStart date:05/14/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Affected Puppet version: Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


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 over 2 years ago

  • Status changed from Unreviewed to Accepted

Also available in: Atom PDF