Class: NullLogger

Inherits:
Logger show all
Defined in:
lib/logger/null_logger.rb

Instance Method Summary collapse

Methods included from Logger::NoTimestampPatch

included

Methods included from Logger::BetterPatch

included

Constructor Details

#initialize(*args) ⇒ NullLogger

Returns a new instance of NullLogger.



4
5
6
# File 'lib/logger/null_logger.rb', line 4

def initialize(*args)

end

Instance Method Details

#add(severity, message = nil, progname = nil) ⇒ Object

All other methods (debug/info) etc use add internally. It’s the lowest level public interface.



10
11
12
# File 'lib/logger/null_logger.rb', line 10

def add(severity, message = nil, progname = nil)
  yield if message.nil? && block_given?
end