UNPKG

@awesome-logger/plugin-sls

Version:

The `plugin-sls` module is a plugin for the **Awesome Logger** project. It provides seamless integration with Alibaba Cloud's Simple Log Service (SLS), enabling efficient and reliable log reporting.

43 lines (39 loc) 762 B
import { LogPlugin } from '@awesome-logger/core'; interface ISlsPluginConfig { host: string; project: string; logstore: string; /** * 发送时间阈值, default 10s */ time?: number; /** * 发送条数阈值, default 10 */ count?: number; /** * 日志主题 */ topic?: string; /** * 日志来源 */ source?: string; /** * 日志标签 */ tags?: Record<string, any>; /** * sts 模式并发控制 */ maxReqCount?: number; } interface IMap { [key: string]: any; } declare class SLSLogPlugin extends LogPlugin { private slsTracker; constructor(opts: ISlsPluginConfig); sendLog(logData: IMap): void; } export { SLSLogPlugin };