Skip to content

Commit

Permalink
(maint) Remove needless check in setting default
Browse files Browse the repository at this point in the history
This line is not sane for the setting of the log_level default

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

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

      loglevel = "notice"

is the same thing with fewer steps
  • Loading branch information
MartyEwings authored and joshcooper committed Sep 6, 2024
1 parent 32499bc commit 3ae3815
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/windows/service/daemon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def parse_runinterval(puppet_path)

def parse_log_level(puppet_path, cmdline_debug)
begin
loglevel = %x(#{puppet_path} config --section agent --log_level notice print log_level).chomp
loglevel = "notice"
unless loglevel && respond_to?("log_#{loglevel}")
loglevel = :notice
log_err("Failed to determine loglevel, defaulting to #{loglevel}")
Expand Down

0 comments on commit 3ae3815

Please sign in to comment.