Class: ExceptionalLogger
- Inherits:
-
Object
- Object
- ExceptionalLogger
- Defined in:
- lib/loggers/exceptional_logger.rb
Defined Under Namespace
Classes: HandleMessageError
Class Method Summary collapse
Class Method Details
.log(severity, message, context, events, metadata) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/loggers/exceptional_logger.rb', line 7 def self.log(severity, , context, events, ) context = context.merge(:severity => severity.to_s, :events => events, :metadata => ) if .kind_of?(Exception) Exceptional.context(context) Exceptional.handle() Exceptional.clear! elsif Log::SEVERITIES[severity] >= Log::SEVERITIES[:error] Exceptional.rescue(, context) do raise HandleMessageError.new() end end end |