Skip to content
New issue

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

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

Already on GitHub? # to your account

Document/warn against using level and message keys in meta #8

Open
aseemk opened this issue Feb 28, 2013 · 0 comments
Open

Document/warn against using level and message keys in meta #8

aseemk opened this issue Feb 28, 2013 · 0 comments

Comments

@aseemk
Copy link

aseemk commented Feb 28, 2013

Related to #7, I remember this bit us for a while early on, and only now do I realize what happened: if you pass a meta object with level or message keys, those properties get silently overwritten:

https://github.com/indexzero/winston-loggly/blob/v0.6.0/lib/winston-loggly.js#L103-L107

  var self = this,
      message = winston.clone(meta || {});

  message.level = level;
  message.message = msg;

Reserving those keys is cool. Just consider documenting this, but better yet, consider logging a warning (maybe just once) if the meta object has those keys. =)

Thanks!

OtterCode pushed a commit to OtterCode/winston-loggly that referenced this issue Jun 22, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant