pinojs / pino-pretty

🌲Basic prettifier for Pino log lines
MIT License
1.27k stars 150 forks source link

Add support to hide metadata in log line #445

Closed timlohse1104 closed 1 year ago

timlohse1104 commented 1 year ago

See https://github.com/pinojs/pino-pretty/issues/444

With option --hideMetadata it is possible to transform a basic log line like this:

[25.7.2023, 15:57:32] INFO: [Nest] 25.7.2023, 15:57:32 [RoutesResolver] | OcrController {/ocr}: {"context":"RoutesResolver"}

into a simulated NestJS log line like this (provided you use the messageFormat option):

[Nest] 25.7.2023, 15:57:32 [RoutesResolver] | OcrController {/ocr}: {"context":"RoutesResolver"}

--hideMetadata option effectively hides epoch, leveland other metadata like reqId from beeing printed in front of the actual log message.

timlohse1104 commented 1 year ago

@jsumners or @mcollina What do you think? Would love to provide you with further pull requests.

jsumners commented 1 year ago

I'm closing this due to lack of response. If you'd like to finish this work, please open a new PR.