module Observed::Logging
Public Instance Methods
log_debug(message)
click to toggle source
Log the debug message through the logger configured via the :logger attribute @param [String] message
# File lib/observed/logging.rb, line 18 def log_debug(message) logger.debug message if logging_enabled? end
log_error(message)
click to toggle source
Log the error message through the logger configured via the :logger attribute @param [String] message
# File lib/observed/logging.rb, line 36 def log_error(message) logger.error message if logging_enabled? end
log_info(message)
click to toggle source
Log the info message through the logger configured via the :logger attribute @param [String] message
# File lib/observed/logging.rb, line 24 def log_info(message) logger.info message if logging_enabled? end
log_warn(message)
click to toggle source
Log the warn message through the logger configured via the :logger attribute @param [String] message
# File lib/observed/logging.rb, line 30 def log_warn(message) logger.warn message if logging_enabled? end
logging_enabled?()
click to toggle source
@return [Boolean] `true` if a value is set for the attribute :logger
# File lib/observed/logging.rb, line 12 def logging_enabled? has_attribute_value? :logger end