@binxhealth/pino-stackdriver
A utility that makes express-pino logs StackDriver-compatible
Installation
yarn add @binxhealth/pino-stackdriver --dev
Usage
node server.js | npx pino-stackdriver
Or with a global install:
node server.js | pino-stackdriver
Or create a new stream and pass it to pino
import { createStream } from '@binxhealth/pino-stackdriver';
const logger = pino(
{
level: 'debug',
},
createStream()
);
logger.info('This works the same as usual...');
logger.error('...and will log to stdout with the correct Stackdriver format');