lib/multilogger.rb in multilogger-0.1.4 vs lib/multilogger.rb in multilogger-0.1.5
- old
+ new
@@ -19,10 +19,10 @@
alias __old_add add
def add(severity, message=nil, progname=nil, &block)
@extra_logs.keys.each do |pattern|
- if message && message.match(pattern)
+ if message && message.respond_to?(:match) && message.match(pattern)
return @extra_logs[pattern].add(severity, message, progname, &block)
end
end
__old_add(severity, message, progname, &block)
end