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

Lots of spaces after TRACE, but not so after INFO #140

Closed
emonddr opened this issue Dec 15, 2020 · 8 comments
Closed

Lots of spaces after TRACE, but not so after INFO #140

emonddr opened this issue Dec 15, 2020 · 8 comments

Comments

@emonddr
Copy link

emonddr commented Dec 15, 2020

I am using fastify with pino and pino pretty.

I see lots of spaces after the TRACE keyword, but not after the INFO keyword.

[2020-12-15T20:33:16:892Z] INFO : Server listening at http://127.0.0.1:3000
[2020-12-15T20:33:28:275Z] TRACE        : [c0c93293-5093-40bf-8d32-76a61287fba7] \/ Entering [POST /someEndPoint]

I tried creating a custom prettifier for the 'level' field, but it is never called.

Any insight is appreciated.

thx

:)

@jsumners
Copy link
Member

See #135

@emonddr
Copy link
Author

emonddr commented Dec 15, 2020

@jsumners , that for the link.

I am still seeing the large gap between the TRACE string and the beginning of the string I actually sent to fastify.log.trace() . what version of pino-pretty contains the fix above?

I am using

 "pino-pretty": "^4.3.0",

I also have these options set

level: 'trace',
  prettyPrint: {
    ignore: 'pid,hostname',
    translateTime: `UTC:yyyy-mm-dd'T'HH:MM:ss:l'Z'`,
  },

@emonddr
Copy link
Author

emonddr commented Dec 15, 2020

Also, I don't have a custom prettifier for 'level' defined when this large gap is occurring.

@jsumners
Copy link
Member

I am saying that PR #135 introduced tabs as alignment tokens. So this is likely a bug. Personally, I'd rather just revert back to not trying to align these fields. But if you, @Zirak, and @dublx would like to collaborate on a fix that retains the formatting, that would be okay as well.

@arthurw1
Copy link
Contributor

I'm observing something similar too. See below:

image

@mcollina
Copy link
Member

This issue needs somebody to work on it, volunteers are welcome :).

@arthurw1
Copy link
Contributor

@mcollina I can take this on!

@mcollina
Copy link
Member

go for it!

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

4 participants