console-ninja
console-ninja copied to clipboard
Other loggers than console
Can console-nija support other loggers like pino. I don`t want to litter my project with console.log calls which is not recommended for production. Can it support other methods in near future.
I don`t want to litter my project with console.log calls which is not recommended for production.
The idea of Console Ninja is to enhance console.log for dev mode. Ie. you may add console.log when exploring some code or debugging an issue, or adding a feature, and Console Ninja can show you the results. Then you remove console.log calls before committing to source control.
In order to help keep ourselves hygienic during such exploration, we have two simple wrapper functions, devLog() and prodLog() to make intentions explicit. However, that practice basically makes Console Ninja useless for us. In theory I could just use console.log() for dev but it feels weird to abandon a useful practice just to make a tool work.
I realize that supporting wrapper functions would be one step down the dark path of supporting logging libraries, but just wanted to highlight this use case in the hopes it helps. :)
Until such time the support for custom loggers is added, logpoints may be used as a (more powerful) alternative.
I'm also very interested in the ability to have custom loggers, pretty much for the same reason as @fearless23.
I hope it suport PinoLogger