# pino-stackdriver

> A transport for pino that sends messages to Google Stackdriver Logging

Latest version **3.0.0** (published 2021-07-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install pino-stackdriver
pnpm add pino-stackdriver
yarn add pino-stackdriver
bun add pino-stackdriver
```

Provides the command `pino-stackdriver`.

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2021-07-20 |
| First published | 2018-10-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 6 |
| Unpacked size | 158.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 64 |
| Author | Osmond van Hemert |
| Maintainers | ovhemert |
| Keywords | pino, pino-transport, google, logging, stackdriver |

## Links

- npm: https://www.npmjs.com/package/pino-stackdriver
- Repository: https://github.com/ovhemert/pino-stackdriver
- Issues: https://github.com/ovhemert/pino-stackdriver/issues
- npm.io page: https://npm.io/package/pino-stackdriver

## Dependencies (6)

- [split2](https://npm.io/package/split2.md) ^3.2.2
- [pumpify](https://npm.io/package/pumpify.md) ^2.0.1
- [through2](https://npm.io/package/through2.md) ^4.0.2
- [commander](https://npm.io/package/commander.md) ^8.0.0
- [fast-json-parse](https://npm.io/package/fast-json-parse.md) ^1.0.3
- [@google-cloud/logging](https://npm.io/package/@google-cloud/logging.md) ^9.5.4

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 3.0.0 (latest) — 2021-07-20
- 2.1.1 — 2020-09-09
- 2.1.0 — 2020-06-02
- 2.0.0 — 2020-03-02
- 1.3.0 — 2019-12-10
- 1.2.10 — 2019-11-19
- 1.2.9 — 2019-10-26
- 1.2.8 — 2019-09-12
- 1.2.7 — 2019-08-04
- 1.2.6 — 2019-06-25
- 1.2.5 — 2019-05-27
- 1.2.4 — 2019-05-18
- 1.2.3 — 2019-04-27
- 1.2.2 — 2019-04-16
- 1.2.1 — 2019-04-01
- … 8 more at https://npm.io/package/pino-stackdriver/versions

## README

# pino-stackdriver

[![CI](https://github.com/ovhemert/pino-stackdriver/workflows/CI/badge.svg)](https://github.com/ovhemert/pino-stackdriver/actions)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d259e1e01a09432398c75c2127aeeaab)](https://app.codacy.com/app/ovhemert/pino-stackdriver?utm_source=github.com&utm_medium=referral&utm_content=ovhemert/pino-stackdriver&utm_campaign=Badge_Grade_Dashboard)
[![Known Vulnerabilities](https://snyk.io/test/npm/pino-stackdriver/badge.svg)](https://snyk.io/test/npm/pino-stackdriver)
[![Coverage Status](https://coveralls.io/repos/github/ovhemert/pino-stackdriver/badge.svg?branch=master)](https://coveralls.io/github/ovhemert/pino-stackdriver?branch=master)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)

This module provides a "transport" for [pino][pino] that forwards messages to the [Google Stackdriver][stackdriver] log service through it's API.

![Screenshot](docs/images/stackdriver-screenshot.png)

You should install `pino-stackdriver` globally for ease of use:

```bash
npm install --production -g pino-stackdriver
```

## Requirements

This package internally uses the Google cloud logging library to call the Stackdriver Logging API. To be able to log to Stackdriver, some setup is needed on the Google Cloud platform.

Create a service account on the page [Stackdriver Logging Client Libraries](https://cloud.google.com/logging/docs/reference/libraries). This downloads a JSON file with the credentials required.

## Installation

To use globally from command line:

```bash
npm install -g pino-stackdriver
```

To include as a library in your project:

```bash
npm install pino-stackdriver
```

## CLI

Want to use `pino-stackdriver` from the CLI?
See the [CLI](./docs/CLI.md) documentation for details.

## API

Want to use `pino-stackdriver` as a library in your project?
See the [API](./docs/API.md) documentation for details.

## Maintainers

Osmond van Hemert
[![Github](https://img.shields.io/badge/-website.svg?style=social&logoColor=333&logo=github)](https://github.com/ovhemert)
[![Web](https://img.shields.io/badge/-website.svg?style=social&logoColor=333&logo=nextdoor)](https://ovhemert.dev)

## Contributing

If you would like to help out with some code, check the [details](./.github/CONTRIBUTING.md).

Not a coder, but still want to support? Have a look at the options available to [donate](https://ovhemert.dev/donate).

## License

Licensed under [MIT](./LICENSE).

[pino]: https://www.npmjs.com/package/pino
[stackdriver]: https://cloud.google.com/logging/

---
_Source: https://npm.io/package/pino-stackdriver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
