summaryrefslogtreecommitdiff
path: root/lib/chef/provider/log.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-07-31 18:08:32 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2014-07-31 18:08:32 -0700
commitb01813613a8244efec0ba0907b9e7dae3461d26c (patch)
tree4378adf04bc2df9fa251d37b6b840a1fe5dcab5f /lib/chef/provider/log.rb
parentb724c2cefb1f753679cab4d13cc83fbad9fbca1b (diff)
downloadchef-b01813613a8244efec0ba0907b9e7dae3461d26c.tar.gz
Revert "CHEF-4028 - Log resource no longer counts as an updated resource unless a write actually happens"
This reverts commit 77119f0f37cc100d450e4f2d2f9dcfb9a57a74a8.
Diffstat (limited to 'lib/chef/provider/log.rb')
-rw-r--r--lib/chef/provider/log.rb16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/chef/provider/log.rb b/lib/chef/provider/log.rb
index 1cdb6c4b0e..0aee349705 100644
--- a/lib/chef/provider/log.rb
+++ b/lib/chef/provider/log.rb
@@ -25,9 +25,6 @@ class Chef
# Chef log provider, allows logging to chef's logs from recipes
class ChefLog < Chef::Provider
- # ordered array of the log levels
- @@levels = [ :debug, :info, :warn, :error, :fatal ]
-
# No concept of a 'current' resource for logs, this is a no-op
#
# === Return
@@ -42,18 +39,7 @@ class Chef
# true:: Always return true
def action_write
Chef::Log.send(@new_resource.level, @new_resource.message)
-
- # resolve the integers for the current log levels
- global_level = @@levels.index(Chef::Log.level)
- resource_level = @@levels.index(@new_resource.level)
-
- # If the resource level is greater than or the same os the global
- # level, then it should have been written to the log. Mark the
- # resource as updated.
- if resource_level >= global_level
- @new_resource.updated_by_last_action(true)
- end
-
+ @new_resource.updated_by_last_action(true)
end
end