Skip to content

Save puma_stdout[stderr].log in JSON format with timestamp added

Qingyu Zhao requested to merge add-timestamps-to-puma-stdout-log into master

What does this MR do?

Per issue #37920 (closed), current puma_stdout.log does not contain timestamp. And puma log are not in JSON format.

[25090] PumaWorkerKiller: Consuming 13792.85546875 mb with master and 16 workers.

This MR:

  1. puma_stdout.log: adds timestamp, and save it in JSON format. So the above log would changed format to:
{"timestamp":"2019-12-04T11:17:04.390116Z","pid":47568,"message":"- Worker 1 (pid: 47609) booted, phase: 0"}
  1. puma_stderr.log: overwrite SnowplowTracker::LOGGER.formatter to JSON formatter -- since part of puma_stderr.log come from SnowplowTracker. After change, the SnowplowTracker log as below:
{"severity":"INFO","timestamp":"2019-12-04T11:17:32.714769Z","pid":47609,"progname":null,"message":"SnowplowTracker::AsyncEmitter initialized with endpoint https://mocked-qingyudebug.snowplow.com/i"}
{"severity":"INFO","timestamp":"2019-12-04T11:17:32.716211Z","pid":47609,"progname":null,"message":"Attempting to send 1 request"}

Conformity

Edited by Yorick Peterse

Merge request reports