logging to false in config.json disables logging, as expected. However, setting it to true throws an error shown below. You can't define a function in a json file, so you can't implement a custom logging handler nor set it to console.log.DEPRECATION WARNING: The logging-option should be either a function or false. Default: console.log
+1
good point.
+1
While this is more of a workaround than a fix for your problem: Update to the lastest version of the cli, rename the config file to config.js and add a module.export. Now you can set it to console.log.
+1
+1
I just ran into this problem. +1 from me as well
As @sdepold said, you just need to export your conf as javascript :
module.exports = {
database: {
host: "",
port: "",
...,
logging: console.log
}
}
He also said "this is more of a workaround than a fix for your problem"
+1
Closing (Issue Cleanup), Please comment if you want to keep it open
I use this line of code to enable / disable according to environment:
logging: (process.env.NODE_ENV !== 'production' ? console.log : null)
Most helpful comment
While this is more of a workaround than a fix for your problem: Update to the lastest version of the cli, rename the config file to
config.jsand add amodule.export. Now you can set it toconsole.log.