@wddv/pino-aliyun-sls
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

ESLint Node.js CI

NPM downloads

@wddv/pino-aliyun-sls

Fork by pino-slack-webhook

A Pino v7+ transport to send events to Aliyun SLS

Installation

npm install --save @wddv/pino-aliyun-sls

Usage

import pino from "pino";
import { PinoAliSLSOption } from "@wddv/pino-aliyun-sls";

const logOptions: PinoAliSLSOption = {
  accessKeyId: "xxx",
  secretAccessKey: "xxx",
  endpoint: "http://cn-hangzhou.log.aliyuncs.com",
  projectName: "xx",
  logStoreName: "xxx",
};

const logger = pino({
  transport: {
    target: "@wddv/pino-aliyun-sls",
    level: "info",
    options: logOptions,
  },
});

logger.info("test log!");

app.ts

Reference

Package Sidebar

Install

npm i @wddv/pino-aliyun-sls

Weekly Downloads

63

Version

0.1.4

License

MIT

Unpacked Size

42.3 kB

Total Files

19

Last publish

Collaborators

  • lampofaladdin