instance method add

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v3.2.22.5

Available in: v2.2.3 v2.3.18 v3.0.20 v3.1.12 v3.2.22.5

Signature

add(severity, message = nil, progname = nil, &block)

No documentation comment.

Parameters

severity req
message opt = nil
progname opt = nil
block block
Source
# File activesupport/lib/active_support/buffered_logger.rb, line 60
    def add(severity, message = nil, progname = nil, &block)
      return if @level > severity
      message = (message || (block && block.call) || progname).to_s
      # If a newline is necessary then create a new message ending with a newline.
      # Ensures that the original message is not mutated.
      message = "#{message}\n" unless message[-1] == ?\n
      buffer << message
      auto_flush
      message
    end

Defined in activesupport/lib/active_support/buffered_logger.rb line 60 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::BufferedLogger

Type at least 2 characters to search.

↑↓ navigate · open · esc close