Julien-R44/pino-loki

Support for custom log levels?

Closed this issue · 1 comments

This doesn't seem to be available, but I'd like to potentially add support for this if I can. Looks like the code is here:

statusFromLevel(level) {
    return {
      10: LokiLogLevel.Debug,
      20: LokiLogLevel.Debug,
      30: LokiLogLevel.Info,
      40: LokiLogLevel.Warning,
      50: LokiLogLevel.Error,
      60: LokiLogLevel.Critical
    }[level] || LokiLogLevel.Info;
  }

My custom log levels automatically end up as info in loki.

yes, that's a good idea. i have quite a few things to do and pino-loki is not currently at the top of my priority list, but I'd be happy to review a PR if you'd like to handle it before I get back to it !