Firebase functions logging with winston papertrail gives ECONNRESET error

368 Views Asked by At

When developing node-js app's I enjoy using winston logging in combination with papertrail (a logging SaaS provider).

I can get the logging from firebase-functions working with papertrail, however, my problem is that when the functions instance is closing down, winston-papertrail throws an error:

Papertrail connection error:  { Error: read ECONNRESET
    at exports._errnoException (util.js:1020:11)
    at TLSWrap.onread (net.js:580:26) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }

I try to close down the winston-papertrail with code like this, at the end of my functions:

logger.close();

However the errors arrive in the firebase console like this:

enter image description here

I would love to know if anyone has a working setup with no errors, or could maybe point me in the right direction.

0

There are 0 best solutions below