dial-once/node-logtify

Could node enable "debug" console.log level

Opened this issue · 0 comments

I wanted to enable console log level debug but could not make it work with or without a preset on with either env vars or direct configuration to logtify:

Example:
logger.debug('test', someObj);

Env vars:
CONSOLE_LOGGING=true
MIN_LOG_LEVEL=debug
MIN_CONSOLE_LOG_LEVEL=debug
LOG_LEVEL=true
LOGENTRIES_LOGGIN = false
LOGSTASH_LOGGING= false
BUGSNAG_LOGGING= false

Stream settings output:

const { stream } = require('logtify')({ presets: ['dial-once', 'prefix'] });
console.log(stream.settings)
{ CONSOLE_LOGGING: true,
 LOGSTASH_LOGGING: false,
 LOGENTRIES_LOGGING: false,
 BUGSNAG_LOGGING: false,
 JSONIFY: true,
 BUGSNAG_APP_VERSION: '0.5.1',
 LOG_TIMESTAMP: true,
 LOG_ENVIRONMENT: true,
 LOG_LEVEL: true,
 LOG_REQID: true,
 LOG_CALLER_PREFIX: true,
 presets: [ ‘dial-once’, ‘prefix’ ] 
}

Expected: to output it to the console but it is not happening

FYI, seems like MIN_LOG_LEVEL is ignored as it is not in the stream output.