Closed mysticflute closed 1 year ago
Using "pino": "^8.11.0"
and "pino-pretty": "^9.4.0"
Thanks for reporting!
Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.
Here's a very basic repo... just a node script that outputs to the logger: https://github.com/mysticflute/pino-pretty-test
Try it with npm test
or or node index.js | npx pino-pretty -L debug
You are not setting the log level on the main pino logger, it's not emitting debut level logs.
Are you saying the L
flag only operates as a secondary log level, it does not affect the pino log level?
Exactly, they are two separate processes
It is a filter. Note that the help text for that switch indicates so.
Thanks. In hindsight that does make sense. Using both libraries for the first time, I wasn't thinking about how pino-pretty doesn't directly change any of the behavior of pino.
I'm using pino-pretty in my project and trying to set the level to
debug
via a cli flag. I have this in my package.json scripts:I've tried
--minimumLevel=debug
,--minimumLevel debug
, nothing seems to be working.I've tried other flags such as
-S
and they did work.