trentm / node-bunyan

a simple and fast JSON logging module for node.js services
Other
7.17k stars 516 forks source link

bunyan -o short from Environment Variable #660

Open johnico opened 3 years ago

johnico commented 3 years ago

I have a docker image that builds the node app and run the app in production then all logs printed to the stdout ( docker logs)

in dev mode I added "| bunyan -o short" and I see the logs as a nice text

but in production, I got only JSON format

how can I control the format via the code? and not cli usage I would like to pass to the logger class an ENV param and then in the class decide which format to use