@binxhealth/pino-stackdriver

A utility that makes express-pino logs StackDriver-compatible

Usage no npm install needed!

<script type="module">
  import binxhealthPinoStackdriver from 'https://cdn.skypack.dev/@binxhealth/pino-stackdriver';
</script>

README

@binxhealth/pino-stackdriver

A utility that makes express-pino logs StackDriver-compatible

CI

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');