lib/semantic_logger/appender/base.rb in semantic_logger-2.5.0 vs lib/semantic_logger/appender/base.rb in semantic_logger-2.6.0
- old
+ new
@@ -32,10 +32,10 @@
# 2011-07-19 14:36:15.660 D [1149:ScriptThreadProcess] Rails -- Hello World
def default_formatter
Proc.new do |log|
tags = log.tags.collect { |tag| "[#{tag}]" }.join(" ") + " " if log.tags && (log.tags.size > 0)
- message = log.message.to_s
+ message = log.message.to_s.dup
message << " -- " << log.payload.inspect if log.payload
message << " -- " << "#{log.exception.class}: #{log.exception.message}\n#{(log.exception.backtrace || []).join("\n")}" if log.exception
duration_str = log.duration ? "(#{'%.1f' % log.duration}ms) " : ''
\ No newline at end of file