lib/logster/base_store.rb in logster-0.1.1 vs lib/logster/base_store.rb in logster-0.1.2

- old
+ new

@@ -36,16 +36,15 @@ def unprotect(message_key) not_implemented end - def report(severity, progname, message, opts = {}) - return if (!message || (String === message && message.empty?)) && skip_empty + def report(severity, progname, msg, opts = {}) + return if (!msg || (String === msg && msg.empty?)) && skip_empty return if level && severity < level - return if ignore && ignore.any? { |pattern| message =~ pattern} - message = Logster::Message.new(severity, progname, message, opts[:timestamp]) + message = Logster::Message.new(severity, progname, msg, opts[:timestamp]) env = opts[:env] backtrace = opts[:backtrace] if env @@ -63,9 +62,11 @@ end message.backtrace = backtrace else message.backtrace = caller.join("\n") end + + return if ignore && ignore.any? { |pattern| message =~ pattern} save message message end