NOTE
本页由仓库元数据、API reports 或示例目录生成;包名、export subpaths、TypeScript 声明和源码链接保留原文,便于与发布产物逐项核对。
声明内容来自仓库 API report,保留英文注释和 TypeScript 原文,便于与发布产物逐项核对。
@loggerjs/datadog API
Generated from packages/datadog/dist/**/*.d.ts. 源报告:api-reports/loggerjs-datadog.api.md.
index.d.ts
ts
import { type LogEvent, type LoggerLevel, type Transport } from "@loggerjs/core";
export type DatadogLogStatus = "debug" | "emergency" | "error" | "info" | "notice" | "warning";
export interface DatadogLogsTransportOptions {
apiKey?: string;
site?: string;
url?: string;
name?: string;
minLevel?: LoggerLevel;
headers?: Record<string, string>;
service?: string;
source?: string;
hostname?: string;
tags?: Record<string, string | number | boolean | null | undefined> | readonly string[];
eventTagKeys?: readonly string[];
message?: (event: LogEvent) => string;
status?: (event: LogEvent) => DatadogLogStatus | string;
fetchFn?: typeof fetch;
}
export interface DatadogLogItem {
message: string;
status: string;
timestamp: number;
service?: string;
ddsource?: string;
hostname?: string;
ddtags?: string;
logger: {
name: string;
};
loggerjs: Record<string, unknown>;
}
export declare function datadogLogsTransport(options?: DatadogLogsTransportOptions): Transport;