notifme / notifme-sdk

A Node.js library to send all kinds of transactional notifications.
https://notifme.github.io/www/
MIT License
1.94k stars 149 forks source link

Remove Winston dependency #41

Closed ansarizafar closed 6 years ago

ansarizafar commented 6 years ago

I want to replace winston with pino logger http://getpino.io/#/, which is much faster than winston. Can I use my own pino instance with notifme?

BDav24 commented 6 years ago

Hi @ansarizafar It's not possible with the options, but you can override the inner instance:

const notifmeSdk = new NotifmeSdk({})
notifmeSdk.logger.innerLogger = {
  log: (level, info, extra) => { ... }
}

(log will be called here: https://github.com/notifme/notifme-sdk/blob/master/src/util/logger.js#L27) I haven't tested but this should work (re-open if it's not the case, we'll work it out).