lib/franz/logger.rb in franz-1.5.3 vs lib/franz/logger.rb in franz-1.5.4

- old
+ new

@@ -48,11 +48,14 @@ long_format = "%s [%s] %s -- %s\n" self.formatter = proc do |severity, datetime, _, message| if colorize if level == 1 - event = { timestamp: Time.now.iso8601(6) }.merge(message) + event = { + level: severity.downcase, + timestamp: Time.now.iso8601(6) + }.merge(message) JSON::generate(event).colorize( color: SEVERITY_COLORS[severity.to_s][0], background: SEVERITY_COLORS[severity.to_s][1] ) + "\n" else @@ -66,10 +69,13 @@ message ] end else # plain if level == 1 - event = { timestamp: Time.now.iso8601(6) }.merge(message) + event = { + level: severity.downcase, + timestamp: Time.now.iso8601(6) + }.merge(message) JSON::generate(event) + "\n" else long_format % [ severity, datetime.iso8601(6), \ No newline at end of file