0.1.4 • Published 1 year ago

@wddv/pino-aliyun-sls v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

0.1.4

1 year ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago