Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structured logging #750

Open
Mehonoshin opened this issue Jan 15, 2020 · 0 comments
Open

Structured logging #750

Mehonoshin opened this issue Jan 15, 2020 · 0 comments

Comments

@Mehonoshin
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant