logtail / logtail-js

Better Stack JavaScript client
https://betterstack.com/logs
ISC License
54 stars 13 forks source link

Pino custom levels are ignored in @logtail/pino #123

Open TheSecurityDev opened 1 month ago

TheSecurityDev commented 1 month ago

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?

curusarn commented 3 weeks ago

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!