Pino: Question: Pinojs and Heroku

Created on 25 Feb 2019  Â·  4Comments  Â·  Source: pinojs/pino

Hi there,

I've started using Pino recently and am really happy about it!

I use the Heroku platform with a combination of Pino + Papertail for logging. As I understand it, Heroku uses Logplex which supports two type of logs: Syslog drains and HTTPS drains.

This results in logs that look like the below:

Feb 25 10:55:13 api app/web.1:  {"level":30,"time":1551052513193,"msg":"Hello World","pid":23,"hostname":"29a30028-29f2-40c8-97e0-bee6af56b231","v":1} 

Heroku seems to append a time stamp along with the resource that generated the log. This makes it difficult to use tools like pino-pretty to parse production logs nicely. I wonder how others have solved for this? Do you need to create your own version of pino pretty?

I'd appreciate any insights.

Cheers!

Most helpful comment

Yes definitely!

Il giorno lun 25 feb 2019 alle 23:19 Andre Gallo notifications@github.com
ha scritto:

Hi @mcollina https://github.com/mcollina, grazie for replying to me!

I could probably try and make a PR if you were willing to provide me some
guidance as where to make that change? Maybe we put this behind a CLI
option?

Cheers!

—
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/pinojs/pino/issues/602#issuecomment-467207062, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADL44zwtUr8qWun4P0AJMDbmMDo2IHCks5vRGFVgaJpZM4bO3EB
.

All 4 comments

At the moment it's not supported, but it's somewhat straightforward to remove it with sed or awk.

A PR to pino-pretty to remove Feb 25 10:55:13 api app/web.1: from the CLI would be awesome. Or maybe we should remove anything before a {.

Hi @mcollina, grazie for replying to me!

I could probably try and make a PR if you were willing to provide me some guidance as where to make that change? Maybe we put this behind a CLI option?

Cheers!

Yes definitely!

Il giorno lun 25 feb 2019 alle 23:19 Andre Gallo notifications@github.com
ha scritto:

Hi @mcollina https://github.com/mcollina, grazie for replying to me!

I could probably try and make a PR if you were willing to provide me some
guidance as where to make that change? Maybe we put this behind a CLI
option?

Cheers!

—
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/pinojs/pino/issues/602#issuecomment-467207062, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADL44zwtUr8qWun4P0AJMDbmMDo2IHCks5vRGFVgaJpZM4bO3EB
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ronag picture ronag  Â·  5Comments

lioaslan picture lioaslan  Â·  3Comments

callumlocke picture callumlocke  Â·  4Comments

NicolaiSchmid picture NicolaiSchmid  Â·  4Comments

normancarcamo picture normancarcamo  Â·  6Comments