X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9c02133098ee65574134fe1781cb35ade6d7ecfb..70190cf363583ea2941d21b7ea6e0a57608d9437:/config/initializers/buffered_logger.rb?ds=sidebyside diff --git a/config/initializers/buffered_logger.rb b/config/initializers/buffered_logger.rb index b75e74ec6..c3a31b319 100644 --- a/config/initializers/buffered_logger.rb +++ b/config/initializers/buffered_logger.rb @@ -4,7 +4,7 @@ module ActiveSupport alias_method :old_add, :add def add(severity, message = nil, progname = nil, &block) - return if @level > severity + return if self.level > severity message = (message || (block && block.call) || progname).to_s time = Time.now message = "[%s.%06d #%d] %s" % [time.strftime("%Y-%m-%d %H:%M:%S"), time.usec, $$, message.sub(/^\n+/, "")]