module Lumberjack::EcsDevice::ExceptionHash
Protected Instance Methods
exception_hash(exception, device)
click to toggle source
# File lib/lumberjack_ecs_device.rb, line 14 def exception_hash(exception, device) hash = {"type" => exception.class.name} hash["message"] = exception.message unless exception.message.nil? trace = exception.backtrace if trace && device && device.respond_to?(:backtrace_cleaner) && device.backtrace_cleaner trace = device.backtrace_cleaner.call(trace) end hash["stack_trace"] = trace if trace hash end