lib/franz/logger.rb in franz-1.5.8 vs lib/franz/logger.rb in franz-1.5.9
- old
+ new
@@ -48,13 +48,16 @@
self.formatter = proc do |severity, datetime, _, message|
severity.downcase!
message = { message: message } unless message.is_a? Hash
- event = {
+ event = message.merge \
'level' => severity,
'@timestamp' => datetime.iso8601(3)
- }.merge message
+
+ unless level == ::Logger::INFO
+ event.merge! marker: File::basename(caller[4])
+ end
if colorize # console output
event = JSON::pretty_generate(event) + "\n"
event.colorize \
color: SEVERITY_COLORS[severity][0],
\ No newline at end of file