winston-loki icon indicating copy to clipboard operation
winston-loki copied to clipboard

use Symbol.for('level') when extracting label

Open jburghardt opened this issue 2 years ago • 0 comments

following line extract the level information from the info object and uses them as the level label

https://github.com/JaniAnttonen/winston-loki/blob/development/index.js#L58

this causes problems when using

  • colorized text
  • text that is padded for formation
  • levels that are lower or uppercase

instead the Symbol.for('level') should be used, as per docu of winston:: https://github.com/winstonjs/winston#streams-objectmode-and-info-objects

jburghardt avatar Jun 08 '22 11:06 jburghardt