Installation
npm install --save @types/splunk-logging
Summary
This package contains type definitions for splunk-logging (http://dev.splunk.com).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/splunk-logging.
import { CoreOptions as RequestOptions } from "request";
export interface Config {
token: string;
name?: string | undefined;
host?: string | undefined;
maxRetries?: number | undefined;
path?: string | undefined;
protocol?: "http" | "https" | undefined;
port?: number | undefined;
url?: string | undefined;
level?: string | undefined;
batchInterval?: number | undefined;
maxBatchSize?: number | undefined;
maxBatchCount?: number | undefined;
}
export interface SendContextMetadata {
host?: string | undefined;
index?: string | undefined;
source?: string | undefined;
sourcetype?: string | undefined;
time?: number | undefined;
}
export interface SendContext {
message: any;
severity?: string | undefined;
metadata?: SendContextMetadata | undefined;
}
export type Callback = (error: Error | undefined, req: any, res: any) => void;
export type EventFormatter = (message: any, severity: string) => any;
export class Logger {
error: (error: Error, context: SendContext) => void;
eventFormatter: EventFormatter;
requestOptions: RequestOptions;
readonly serializedContextQueue: any[];
constructor(config: Config);
flush(callback?: Callback): void;
send(context: SendContext, callback?: Callback): void;
}
Additional Details
- Last updated: Mon, 25 Sep 2023 13:39:06 GMT
- Dependencies: @types/request
- Global values: none
Credits
These definitions were written by Alex Brick, and Borui Gu.