@beyonk/pino-logtail
v1.2.0
Published
Logtail integration for Pino Logger
Keywords
Readme
@beyonk/pino-logtail
@beyonk/pino-logtail is a so called "transport" for the pino logger. pino-logtail receives pino logs from stdin and
sends them to a logsene compatible logger such as logtail via @logtail/node.
For example:
$ node your-app.js | pino-logtail --token my-api-tokenIf your Better Stack source has its own dedicated ingesting host (e.g. sources created in region eu-central-1a), pass its URL via --endpoint instead of shipping to the legacy global endpoint:
$ node your-app.js | pino-logtail --token my-api-token --endpoint https://s123456.eu-central-1a.betterstackdata.comDemo
You can test the integration by running the demo:
$ pnpm demo -- --token <my-api-token>Install
You should install pino-logtail globally so that it can be used as a utility:
$ pnpm install --production -g @beyonk/pino-logtailConfiguration
@beyonk/pino-logtail supports two config options:
token(required) — your logtail (or compatible) api token.endpoint(optional) — a full URL (includinghttps://scheme) for a dedicated ingesting host. When omitted, logs are sent to the defaulthttps://in.logtail.comendpoint.
