@wddv/pino-aliyun-sls
v0.1.4
Published
pino-aliyun-sls is a Pino v7+ compatible transport to forward log events to Slack from a dedicated worker
Downloads
11
Maintainers
Readme
@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!");
Reference
- https://github.com/lampofaladdin/pino-slack-webhook
- https://getpino.io/#/docs/transports?id=writing-a-transport
- https://github.com/autotelic/pino-seq-transport
- https://github.com/technicallyjosh/pino-http-send