simple-node-logger
simple-node-logger copied to clipboard
It creates the file, but writes nothing...
const { spawn } = require('child_process'); const mysql = require('mysql');
logfile_opts = { logDirectory:'logs', // NOTE: folder must exist and be writable... fileNamePattern:'pheal-<DATE>.log', dateFormat:'YYYYMMDDHHmm' } const log = require('simple-node-logger').createRollingFileLogger( logfile_opts );
log.info('test'); //It creates the file in the right folder, but writes nothing to the file...
Is there some dependency missing?
Node version v10.8.0
What happens if you put log.setLevel('all'); before your log.info call?
Nothing at all...