logtail-js icon indicating copy to clipboard operation
logtail-js copied to clipboard

Pino custom levels are ignored in @logtail/pino

Open TheSecurityDev opened this issue 1 year ago • 1 comments

Pino allows you to customize the log levels, like:

const additionalLevels = {
  notice: 35, // Between info and warn
  critical: 55, // Between error and fatal
};

const pinoLogger = pino(
  {
    // ...other options
    customLevels: additionalLevels
  }
);

However, there doesn't seem to be any way to pass these options to the @logtail/pino transport. It's just using its own hard-coded log levels instead. Is there any way to change this?

TheSecurityDev avatar Sep 20 '24 22:09 TheSecurityDev

Hi @TheSecurityDev,

Thank you for reaching out!

You're right. Currently, there's no way to pass the custom log levels to Pino transport. I'll pass this feedback on to the team to see if we can improve this.

Thank you!

curusarn avatar Sep 30 '24 08:09 curusarn