Closed optikalefx closed 1 year ago
In thge config you pass to Log.init() you can specify what log levels go to what writers. So
Log.init({
writers: [{
name: 'my-console-logger',
type: 'console',
levels: 'info,warn,error,access', // This comma separated list can control what levels get written.
formatter: 'json'
}],
});
Bit more here: https://github.com/awesomeeng/awesome-log/blob/master/docs/Configuration.md#writer-configuration
For the ENV portion you will need to figure that out yourself, but you're a smart guy. :)
We'd like to use an ENV var to tell prod not to log debug logs. I don't see anything in the docs that allow for this. Is it possible that I'm not seeing?
Thanks!