method
add
add(severity, message = nil, progname = nil, &block)
public
Hide source
# File activesupport/lib/active_support/buffered_logger.rb, line 58 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