class EtCcdClient::NullLogger

Null logger class. This is essentially the same as sending data down the `/dev/null` black hole.

@example Basic Usage

logger = NullLogger.new
Rails.logger = logger

@example Basic Pattern Usage

class SomeService
  def initialize(options = {})
    @logger = options[:logger] || NullLogger.new
  end

  def perform
    @logger.debug -> { "do some work here" }
    # .. ..
    @logger.info -> { "finished working" }
  end
end

service = SomeService.new(logger: Logger.new(STDOUT))
service.perform

silent = SomeService.new(logger: NullLogger.new
silent.perform

Public Instance Methods

debug(*_args) click to toggle source

@param _args Anything that we want to ignore @return [nil]

# File lib/et_ccd_client/null_logger.rb, line 91
def debug(*_args)
  nil
end
debug?() click to toggle source

@return [FALSE]

# File lib/et_ccd_client/null_logger.rb, line 96
def debug?
  false
end
error(*_args) click to toggle source

@param _args Anything that we want to ignore @return [nil]

# File lib/et_ccd_client/null_logger.rb, line 58
def error(*_args)
  nil
end
error?() click to toggle source

@return [FALSE]

# File lib/et_ccd_client/null_logger.rb, line 63
def error?
  false
end
fatal(*_args) click to toggle source

@param _args Anything that we want to ignore @return [nil]

# File lib/et_ccd_client/null_logger.rb, line 47
def fatal(*_args)
  nil
end
fatal?() click to toggle source

@return [FALSE]

# File lib/et_ccd_client/null_logger.rb, line 52
def fatal?
  false
end
info(*_args) click to toggle source

@param _args Anything that we want to ignore @return [nil]

# File lib/et_ccd_client/null_logger.rb, line 80
def info(*_args)
  nil
end
info?() click to toggle source

@return [FALSE]

# File lib/et_ccd_client/null_logger.rb, line 85
def info?
  false
end
tagged(*) { || ... } click to toggle source

@param _args Anything that we want to ignore @return [nil]

# File lib/et_ccd_client/null_logger.rb, line 36
def tagged(*)
  yield if block_given?
end
unknown(*_args) click to toggle source

@param _args Anything that we want to ignore @return [nil]

# File lib/et_ccd_client/null_logger.rb, line 41
def unknown(*_args)
  nil
end
warn(*_args) click to toggle source

@param _args Anything that we want to ignore @return [nil]

# File lib/et_ccd_client/null_logger.rb, line 69
def warn(*_args)
  nil
end
warn?() click to toggle source

@return [FALSE]

# File lib/et_ccd_client/null_logger.rb, line 74
def warn?
  false
end