lib/multilogger.rb in multilogger-0.1.3 vs lib/multilogger.rb in multilogger-0.1.4

- 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.match(pattern) + if message && message.match(pattern) return @extra_logs[pattern].add(severity, message, progname, &block) end end __old_add(severity, message, progname, &block) end