Class: Commons::Logging::Impl::NoOpLog

Inherits:
Object
  • Object
show all
Includes:
Log
Defined in:
lib/commons/logging/impl/no_op_log.rb

Direct Known Subclasses

SimpleLog

Constant Summary

Constants included from Log

Log::DEBUG, Log::ERROR, Log::FATAL, Log::INFO, Log::TRACE, Log::WARN

Instance Method Summary collapse

Methods included from Log

#debug, #debug?, #error, #error?, #fatal, #fatal?, #info, #info?, #trace, #trace?, #warn, #warn?

Constructor Details

#initialize(name = nil) ⇒ NoOpLog

Returns a new instance of NoOpLog.



42
43
44
# File 'lib/commons/logging/impl/no_op_log.rb', line 42

def initialize(name = nil)
  # do nothing.
end

Instance Method Details

#enabled_for?(level) ⇒ Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/commons/logging/impl/no_op_log.rb', line 52

def enabled_for?(level)
  return false
end

#log(level, message, exception = nil) ⇒ Object



47
48
49
# File 'lib/commons/logging/impl/no_op_log.rb', line 47

def log(level, message, exception = nil)
  # do nothing.
end