Skip to content

Commit 97670c7

Browse files
committed
Tweak attribute change output
1 parent cca7048 commit 97670c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cookbooks/boxcutter_chef/files/config/attribute_changed_handler.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Chef.event_handler do
1212
on :attribute_changed do |precedence, key, value|
1313
# Do absolutely nothing unless debug logging is enabled
14-
next unless [:debug, :trace].include?(Chef::Config[:log_level])
14+
next unless Chef::Log.debug?
1515

1616
# Skip attributes coming from ohai
1717
next if precedence == :automatic
@@ -24,7 +24,7 @@
2424
filename, line_number = frame.split(':')
2525
location = "#{filename}:#{line_number}"
2626
Chef::Log.debug(
27-
"- node.#{precedence}#{key.map { |n| "[\"#{n}\"]" }.join} = #{value} at #{location}",
27+
"Attribute change: node.#{precedence}#{key.map { |n| "[\"#{n}\"]" }.join} = #{value} at #{location}",
2828
)
2929
end
3030
end

0 commit comments

Comments
 (0)