one-line-logger icon indicating copy to clipboard operation
one-line-logger copied to clipboard

one-line-logger as a executable program

Open erfanium opened this issue 2 years ago • 5 comments

Prerequisites

  • [X] I have written a descriptive issue title
  • [X] I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

I would love to use one-line-logger like this.

node app.js | @fastify/one-line-logger

it it possible and in the scope of this repo? i would like to contribute on it

Motivation

No response

Example

No response

erfanium avatar May 22 '23 16:05 erfanium

Not sure if pino is sponsoring this approach as it is called "legacy" in its docs: https://github.com/pinojs/pino/blob/master/docs/transports.md#legacy-transports

Opinions @climba03003 ?

From my point of view, I like the pipe operator 👍🏼

Eomm avatar May 23 '23 07:05 Eomm

@Eomm there's pino-pretty which is not legacy. https://github.com/pinojs/pino-pretty

erfanium avatar May 23 '23 07:05 erfanium

So do something like https://github.com/pinojs/pino-pretty/blob/master/bin.js

Uzlopak avatar May 23 '23 08:05 Uzlopak

We should probably find a better term than "legacy" in the pino docs.

mcollina avatar May 23 '23 10:05 mcollina

Opinions @climba03003 ?

We can go with simple script that pipe the stdin to Transform first.

Note that this feature is only useful in development. Welcome for PR.

climba03003 avatar May 23 '23 13:05 climba03003