Module: Rlyeh::Logger
- Included in:
- Connection, DeepOnes::Auth::Base, DeepOnes::Logger, DeepOnes::Parser, Server, Session
- Defined in:
- lib/rlyeh/logger.rb
Class Method Summary collapse
Class Method Details
.crash(exception, message = nil) ⇒ Object
11 12 13 |
# File 'lib/rlyeh/logger.rb', line 11 def crash(exception, = nil) error [, format_exception(exception)].compact.join("\n") end |
.format_exception(exception) ⇒ Object
15 16 17 18 |
# File 'lib/rlyeh/logger.rb', line 15 def format_exception(exception) str = "#{exception.class}: #{exception.to_s}\n" str << exception.backtrace.map { |s| " #{s}" }.join("\n") end |