From 1c4f886e883f947b649613a21955929fa6d7e94c Mon Sep 17 00:00:00 2001 From: Elvin Efendi Date: Wed, 9 Dec 2015 23:43:32 -0500 Subject: refactor and fix bugs introduced with new changes --- lib/oxidized/hook.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/oxidized/hook.rb') 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 -- cgit v1.2.1