/pino-loki-transport

A Pino transport to send logs to Loki via protobuf

Primary LanguageJavaScript

Pino-Loki-Transport

A transport module for Pino to Loki using GRPC (Protobuf).

Installation

Use the NPM package manager to install Pino-Loki-Transport.

npm i --save pino-loki-transport

Usage

import pino from 'pino';
import { LogWorkerOptions } from 'pino-loki-transport';

const logger = pino({
  transport: {
    target: 'pino-loki-transport', 
    options: {
      lokiUrl: 'http://{{loki server ip address}}'
    } as LogWorkerOptions
  }
});

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT