module Lexicon::Common::Mixin::LoggerAware
Attributes
logger[RW]
@return [Logger]
Public Instance Methods
log(*args, **options)
click to toggle source
# File lib/lexicon/common/mixin/logger_aware.rb, line 10 def log(*args, **options) if !logger.nil? logger.debug(*args, **options) end end
log_error(error)
click to toggle source
# File lib/lexicon/common/mixin/logger_aware.rb, line 16 def log_error(error) if error.nil? log('Error (nil)') elsif !logger.nil? logger.error([error.message, *error.backtrace].join("\n")) end end