Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Latest commit

 

History

History
53 lines (37 loc) · 990 Bytes

readme.md

File metadata and controls

53 lines (37 loc) · 990 Bytes

pino-loggly Build Status

send pino logs to loggly

Install

npm install pino-loggly

Usage

Send pino logs to loggly

node my-app.js | pino-loggly [options]
import PinoLoggly from "pino-loggly";

const loggly = new PinoLoggly({
  token: 'token-goes-here',
  tags: ['tag1', 'tag2'],
  json: false,
  returnStream: true,
});

const logger = pino(loggly.init());

logger.error('Hello World');

Options

Usage
  $ pino-loggly [options]

Options
  --token         Loggly token [Required]
  --tag           list of tags [Default: ""]
  --json          data is json type
  --returnStream  send to stdout and/or stderr
  --logLevel      log level [Default: info]

Example
  $ pino-loggly --token 2c52ac24-2c52ac24-2c52ac24-2c52ac24 --tag pino-loggly --tag cli-msg --json false

License

MIT © Rhaynel Parra Aguiar