fastify / one-line-logger

Helps you format fastify's log into a nice one line message
MIT License
32 stars 7 forks source link

one-line-logger as a executable program #23

Open erfanium opened 1 year ago

erfanium commented 1 year ago

Prerequisites

🚀 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

Eomm commented 1 year ago

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 👍🏼

erfanium commented 1 year ago

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

Uzlopak commented 1 year ago

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

mcollina commented 1 year ago

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

climba03003 commented 1 year ago

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.