puppetlabs / puppet

Server automation framework and application
https://puppet.com/open-source/#osp
Apache License 2.0
7.47k stars 2.19k forks source link

(maint) Remove needless check in setting default #9476

Closed joshcooper closed 2 months ago

joshcooper commented 2 months ago

This line is not sane for the setting of the log_level default (because specifying --log_level on the command line always takes precedence over what's specified in puppet.conf)

loglevel = %x{ #{puppet_path} config --section agent --log_level notice print log_level }.chomp

It sets log_level to notice, and then return the output of the log_level setting

  loglevel = "notice"

is the same thing with fewer steps

Author: Marty Ewings martyewings@gmail.com Supersedes PR #8958

joshcooper commented 2 months ago

See https://github.com/puppetlabs/puppet/pull/8958#discussion_r1393789337 for details