Skip to content

Commit 955ace4

Browse files
committed
make Worker#log / Worker#log! available for backwards compat
1 parent f438ef0 commit 955ace4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/resque/worker.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,14 @@ def procline(string)
605605
end
606606

607607
# Log a message to Resque.logger
608-
alias_method :log, :info
609-
alias_method :log!, :debug
608+
# can't use alias_method since info/debug are private methods
609+
def log(message)
610+
info(message)
611+
end
612+
613+
def log!(message)
614+
debug(message)
615+
end
610616

611617
# Deprecated legacy methods for controlling the logging threshhold
612618
# Use Resque.logger.level now, e.g.:

0 commit comments

Comments
 (0)