ovhemert / pino-papertrail

🌲 Load pino logs into Papertrail
MIT License
17 stars 12 forks source link

Add pino v7 transport #48

Open vladshcherbin opened 3 years ago

vladshcherbin commented 3 years ago

🚀 Feature Proposal

Pino v7 coming with new transports - https://getpino.io/#/docs/transports?id=v7-transports

Motivation

Would be awesome to have pino v7 transport out of the box.

Example

I've tried to connect pino-papertrail as shown in pino v7 docs example and it seems to be working:

transport

import papertrail from 'pino-papertrail'

export default function paperTrailTransport(options = {}) {
  return papertrail.createWriteStream({ ...options, appname: 'api-server' })
}

logger

import pino from 'pino'

const transport = pino.transport({
  target: './papertrail-transport.js',
  options: { host: 'xxx', port: 111 }
})

const logger = pino(transport)

export default logger

If I undestand correctly, a default export with such transport is everything what needs to be done.

p.s. I'm just trying papertrail and not sure everything's correctly set, but I can see correct logs in papertrail panel 😉

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

vladshcherbin commented 2 years ago

🤖 🔫

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.