lib/ezlog/logging_layout.rb in ezlog-0.2.0 vs lib/ezlog/logging_layout.rb in ezlog-0.2.1

- old
+ new

@@ -1,8 +1,7 @@ require 'time' require 'multi_json' -require 'logging' module Ezlog class LoggingLayout < ::Logging::Layout def initialize(context = {}) @initial_context = context @@ -55,10 +54,10 @@ { message: exception.message, error: { class: exception.class.name, message: exception.message, - backtrace: exception.backtrace.first(20) + backtrace: exception.backtrace&.first(20) } } end end end