Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Zoddo opened this issue May 24, 2019 · 0 comments
Open
Labels
Milestone

Comments

@Zoddo
Copy link

Zoddo commented May 24, 2019

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().

@kkamkou kkamkou added the bug label May 25, 2019
@kkamkou kkamkou added this to the Version 1.4.0 milestone May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants