Class: ActiveSupport::BufferedLogger
- Inherits:
-
Object
- Object
- ActiveSupport::BufferedLogger
- Defined in:
- lib/turner_logs.rb
Instance Method Summary collapse
Instance Method Details
#add(severity, message = nil, progname = nil, &block) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/turner_logs.rb', line 24 def add(severity, = nil, progname = nil, &block) return if @level > severity = ( || (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. = "#{}\n" unless [1] == "\n" buffer << auto_flush end |