ddollar / foreman

Manage Procfile-based applications

Home Page:http://ddollar.github.com/foreman

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Structured logging

Mehonoshin opened this issue · comments

Hey folks.

When I use foreman at any production application, it produces logs which are not structured as JSON, even though the underlying application does.

For example

  | 17:26:51 web.1    \| {"app":"omniscrapper_hq","severity":"INFO","time":"2020-01-15T17:26:51Z","message":"(0.001321s) INSERT INTO \"job_events\" (\"event\", \"job_id\", \"task_id\", \"created_at\", \"updated_at\") VALUES ('finished', '1d8aaa99530fbb096983c048', '10', '2020-01-15 17:26:51.750088+0000', '2020-01-15 17:26:51.750088+0000') RETURNING *"}

So the beginning of the message, where the service name and timestamp are located can't be formatted.

@ddollar is it possible to override logging format? Or maybe I can create a PR to introduce some custom JSON logger?