UNPKG

pino-datadogmatic

Version:

Pino transporter for Datadog and Logmatic

37 lines (23 loc) 1.05 kB
pino-datadogmatic ================= > 🌲 Pino transporter for Datadog and Logmatic ## About This is a [pino][] transporter for both Datadog and Logmatic. Name come from contraction of both services. ## Usage Install it globally to pipe data to it. ```bash node myserver | pino-datadogmatic ``` Once well configured, it will convey data to logmatic or datadog, while outputing stdin to stdout like a `tee` program. It does so by prepending each line by an API key you would have configured. ## Configuration Transporter is to be configured with environment variables: - `LOGMATIC_API_KEY` : Specify the API key for logmatic - `DATADOG_API_KEY` : Specify the API for datadog configuration. you can also specify you want to forward to the EU region by adding `--eu` flag. Depending which one environment variable you set, `pin-datadogmatic` will the configured to forward to the appropriate server. Alternatively you can define `HOST`, `PORT`, and `API_KEY` to forward to a custom server. [pino]: https://github.com/pinojs/pino