Sha256: 42724b3e426b34e034cf79c9d72ddcd4d3b13bdfe03977641c21d6e4e5c6ec36

Contents?: true

Size: 311 Bytes

Versions: 1

Compression:

Stored size: 311 Bytes

Contents

require 'logger'

class NullLogger < Logger
  def initialize(*args)
    self.level = Logger::INFO
  end

  # All other methods (debug/info) etc use add internally.
  # It's the lowest level public interface.
  def add(severity, message = nil, progname = nil)
    yield if message.nil? && block_given?
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
logger-better-0.2.2 lib/logger/null_logger.rb