class Logger::LoggerIO
An IO-like interface for a logger object
Attributes
level[R]
logger[R]
Public Class Methods
new(logger, level)
click to toggle source
# File lib/utilrb/logger/io.rb, line 7 def initialize(logger, level) @logger, @level = logger, level @buffer = '' end
Public Instance Methods
print(*msg)
click to toggle source
# File lib/utilrb/logger/io.rb, line 16 def print(*msg) @buffer << msg.join("") end
puts(*msg)
click to toggle source
# File lib/utilrb/logger/io.rb, line 11 def puts(*msg) print msg logger.send(level, @buffer) @buffer = '' end