Skip to content

Could node enable "debug" console.log level #24

@mrister

Description

@mrister

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions