Note that --test is implemented in both agent and apply, so make sure to change it in both places.
On Wed Nov 05 2014 at 6:10:23 PM David Schmitt <[email protected]> wrote: > True. Making "--test" a "must be at least info", instead of exactly > equal makes sense and doesn't violate my statement. > > D. > > On 2014-11-05 09:58, Michael Smith wrote: > > I agree, though I like changing the definition of --test to be at least > --info instead of exactly (solution 1). It makes the behavior more useful. > > > > Sent from my iPad > > > >> On Nov 4, 2014, at 10:53 PM, David Schmitt <[email protected]> wrote: > >> > >>> On 2014-11-04 22:46, Josh Cooper wrote: > >>> Stefan Goethals added the ability to specify puppet's log_level in > >>> puppet.conf[1] and it will be available in Puppet 4.0. This was > >>> originally redmine ticket #4761, so thank you Stefan for resolving > that! > >>> > >>> I did run into one surprise and wanted to get feedback. If you specify > >>> log_level=debug in puppet.conf, and run with `puppet agent --verbose` > >>> (or more commonly `puppet agent --test`, which implies `--verbose` and > a > >>> bunch of other settings), then the agent's log_level will be reset back > >>> down to the info level, and you won't get any debug output. > >>> > >>> To see debug output, you have to execute `puppet agent --test --debug` > >>> or specify a lot of the things `--test` implies, but leave out > >>> `--verbose`, e.g `puppet agent --no-daemonize --onetime` > >>> > >>> The problem originates in Puppet::Application#set_log_level > >>> > >>> if options[:debug] > >>> Puppet::Util::Log.level = :debug > >>> elsif options[:verbose] > >>> Puppet::Util::Log.level = :info > >>> end > >>> > >>> The code assumes that if debug is not specified on the command line, > but > >>> verbose is, then the log level must be info. If the log level is set to > >>> debug in puppet.conf, then this will actually downgrade the logging > >>> level to info. > >>> > >>> We could fix this a few different ways. > >>> > >>> 1. If --verbose (or --test) is specified, then ensure the log_level is > >>> *at least* at the info level > >>> 2. Change --test to imply --debug instead of --verbose > >>> 3. Something else? > >>> > >>> Josh > >>> > >>> [1] https://tickets.puppetlabs.com/browse/PUP-2998 > >> > >> Commandline options should always trump config file settings for > reduced surprise factor. > >> > >> > >> Regards, David > >> > >> -- > >> * Always looking for people I can help with awesome projects * > >> Twitter: @dev_el_ops G+: https://plus.google.com/+DavidSchmitt > >> Blog: http://club.black.co.at/log/ > >> LinkedIn: http://at.linkedin.com/in/davidschmitt > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups "Puppet Developers" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > >> To view this discussion on the web visit https://groups.google.com/d/ > msgid/puppet-dev/5459C983.1060605%40dasz.at. > >> For more options, visit https://groups.google.com/d/optout. > > > > > -- > * Always looking for people I can help with awesome projects * > Twitter: @dev_el_ops G+: https://plus.google.com/+DavidSchmitt > Blog: http://club.black.co.at/log/ > LinkedIn: http://at.linkedin.com/in/davidschmitt > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/puppet-dev/545A59F5.4070906%40dasz.at. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CAAAzDLdQ_KuiDoM_Li6t8ECJ5GpT4jopvfyornUfTX5sQ7D8%3Dw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
