logdna / logdna-winston

LogDNA's Node.js logging module with support for Winston
MIT License
16 stars 14 forks source link

fix(level): Separate concerns for the "level" parameter #35

Closed darinspivey closed 3 years ago

darinspivey commented 3 years ago

fix(level): Separate concerns for the "level" parameter

Both Winston and LogDNA have a "level" parameter, but they mean different things. In Winston, it represents a "max" level wherein anything logged above that level's rank will not be logged (and thus sent to LogDNA). To disambiguate this logger transport, the parameter will be called maxLevel, and will only apply to Winston. LogDNA's level parameter is actually not usable with the implementation of this transport since all logs will be specifying a level value.

Fixes: #33


fix(levels): Automatically set up LogDNA custom levels for defaults

Winston uses "levels" as an object where the values are numeric. If no levels are specified, it uses the "npm" levels that are defined in their docs. These levels are not all supported by LogDNA, so if "levels" is used, automatically set up custom LogDNA levels based on the keys of the winston levels object.

logdnabot commented 3 years ago

:tada: This PR is included in version 4.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: