Class: Cinch::Logger::FormattedLogger
- Inherits:
-
Cinch::Logger
- Object
- Cinch::Logger
- Cinch::Logger::FormattedLogger
- Defined in:
- lib/cinch/logger/formatted_logger.rb
Overview
Instance Attribute Summary
Attributes inherited from Cinch::Logger
Instance Method Summary collapse
-
#exception(e)
Logs an exception.
Methods inherited from Cinch::Logger
#debug, #error, #fatal, #incoming, #info, #initialize, #log, #outgoing, #warn, #will_log?
Constructor Details
This class inherits a constructor from Cinch::Logger
Instance Method Details
#exception(e)
This method returns an undefined value.
Logs an exception.
20 21 22 23 24 |
# File 'lib/cinch/logger/formatted_logger.rb', line 20 def exception(e) lines = ["#{e.backtrace.first}: #{e.} (#{e.class})"] lines.concat e.backtrace[1..-1].map {|s| "\t" + s} log(lines, :exception, :error) end |