Module: SimpleLogging
Defined Under Namespace
Modules: MessageFormatting
Instance Method Summary
collapse
Instance Method Details
#log(method, variables = nil, msg_type = Logger::Severity::INFO) ⇒ Object
46
47
48
49
50
|
# File 'lib/simple_logging.rb', line 46
def log(method, variables = nil, msg_type = Logger::Severity::INFO)
msg = "#{self.class}: #{method}"
msg << ": #{variables.awesome_inspect}" if variables
logger.log(msg_type, msg)
end
|
#logger(stream = STDOUT) ⇒ Object
43
44
45
|
# File 'lib/simple_logging.rb', line 43
def logger(stream = STDOUT)
@logger ||= Logger.new(stream)
end
|