summaryrefslogtreecommitdiff
path: root/lib/oxidized/hook.rb
diff options
context:
space:
mode:
authorElvin Efendi <elvin.efendiev@shopify.com>2015-12-09 23:43:32 -0500
committerElvin Efendi <elvin.efendiev@shopify.com>2015-12-13 19:02:36 -0500
commit1c4f886e883f947b649613a21955929fa6d7e94c (patch)
treef505d91af55ee18837d0290f3d9ea7ff8531240b /lib/oxidized/hook.rb
parent82db9fdd9c135a445a4839e39b245a9965091219 (diff)
refactor and fix bugs introduced with new changes
Diffstat (limited to 'lib/oxidized/hook.rb')
-rw-r--r--lib/oxidized/hook.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/oxidized/hook.rb b/lib/oxidized/hook.rb
index d774653..029688d 100644
--- a/lib/oxidized/hook.rb
+++ b/lib/oxidized/hook.rb
@@ -46,7 +46,7 @@ class HookManager
hook.cfg = cfg
@registered_hooks[event] << RegisteredHook.new(name, hook)
- Log.debug "Hook #{name.inspect} registered #{hook.class} for event #{event.inspect}"
+ Oxidized.logger.debug "Hook #{name.inspect} registered #{hook.class} for event #{event.inspect}"
end
def handle event, ctx_params={}
@@ -57,7 +57,7 @@ class HookManager
begin
r_hook.hook.run_hook ctx
rescue => e
- Log.error "Hook #{r_hook.name} (#{r_hook.hook}) failed " +
+ Oxidized.logger.error "Hook #{r_hook.name} (#{r_hook.hook}) failed " +
"(#{e.inspect}) for event #{event.inspect}"
end
end
@@ -81,7 +81,7 @@ class Hook
end
def log(msg, level=:info)
- Log.send(level, "#{self.class.name}: #{msg}")
+ Oxidized.logger.send(level, "#{self.class.name}: #{msg}")
end
end