pino-parseable
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

pino-parseable

Pino v7+ transport for Parseable.

Install

Yarn

yarn add pino-parseable

NPM

npm i pino-parseable

Usage

import { pino } from "pino";
import { ParseableTransportOptions } from "pino-parseable";

const myUsername = "foo";
const myPassword = "bar";

const options: ParseableTransportOptions = {
    endpoint: "https://my-parseable-instance.com",
    stream: "my-test-stream",
    auth: {
        // provide your base64 encoded key directly
        key: Buffer.from(`${myUsername}:${myPassword}`).toString("base64"),
        // or provide your username and password as is
        username: myUsername,
        password: myPassword
    }
};

const logger = pino({
    transport: {
        target: "pino-parseable",
        options
    }
});

logger.info("Hello world");

Readme

Keywords

none

Package Sidebar

Install

npm i pino-parseable

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

6.22 kB

Total Files

5

Last publish

Collaborators

  • battlesqui_d