lib/semantic_logger/base.rb in semantic_logger-2.17.0 vs lib/semantic_logger/base.rb in semantic_logger-2.18.0

- old
+ new

@@ -277,50 +277,10 @@ # set for this instance def level_index @level_index || SemanticLogger.default_level_index end - # Struct Log - # - # level - # Log level of the supplied log call - # :trace, :debug, :info, :warn, :error, :fatal - # - # thread_name - # Name of the thread in which the logging call was called - # - # name - # Class name supplied to the logging instance - # - # message - # Text message to be logged - # - # payload - # Optional Hash or Ruby Exception object to be logged - # - # time - # The time at which the log entry was created - # - # duration - # The time taken to complete a benchmark call - # - # tags - # Any tags active on the thread when the log call was made - # - # level_index - # Internal index of the log level - # - # exception - # Ruby Exception object to log - # - # metric [Object] - # Object supplied when benchmark_x was called - # - # backtrace [Array<String>] - # The backtrace captured at source when the log level >= SemanticLogger.backtrace_level - Log = Struct.new(:level, :thread_name, :name, :message, :payload, :time, :duration, :tags, :level_index, :exception, :metric, :backtrace) - # Whether to log the supplied message based on the current filter if any def include_message?(struct) return true if @filter.nil? if @filter.is_a?(Regexp) @@ -333,10 +293,10 @@ # Log message at the specified level def log_internal(level, index, message=nil, payload=nil, exception=nil, &block) # Detect exception being logged if exception.nil? && payload.nil? && message.kind_of?(Exception) exception = message - message = exception.inspect + message = nil elsif exception.nil? && payload && payload.respond_to?(:backtrace) && payload.respond_to?(:message) # Under JRuby a java exception is not a Ruby Exception # Java::JavaLang::ClassCastException.new.is_a?(Exception) => false exception = payload payload = nil