Skip to content

Manually setting levels or aliases doesn't expose corresponding methods #52

@Zoddo

Description

@Zoddo

Let's say you add an additional level like this:

const log = require('gelf-pro');

log.setConfig({
  emergency: 0,
  alert: 1,
  critical: 2,
  error: 3,
  warning: 4,
  notice: 5,
  info: 6,
  debug: 7,
  trace: 8,
});

log.trace() will be undefined. This is because these methods are defined while requiring the module, with no chances to update the levels or aliases before.

Maybe the methods should be redefined while calling setConfig().

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions