pino
pino copied to clipboard
Change Log Level for root and children
I am working on a CLI app and want the user to pass be able to pass in a debug flag that modifies the log level. Our code has a singleton root and many child loggers that are created as module level constants.
We are currently using commander.js for cli arg parsing. We were considering writing some additional custom arg parsing for setting the level when the loggers get created but now are looking at switching some of the proxy hack solutions that we have seen online. There are a number of other github issues.
This seems like a super basic scenario. Can we get a callback or something so we can override specify the log level on root and all children?
The best way to approach this is to add all created loggers in a array and iterate that to change the levels.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.