0.11.6 • Published 20 days ago

@types/splunk-logging v0.11.6

Weekly downloads
3,584
License
MIT
Repository
github
Last release
20 days ago

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.

index.d.ts

// Type definitions for splunk-logging 0.11
// Project: http://dev.splunk.com
// Definitions by: Alex Brick <https://github.com/bricka>
//                 Borui Gu <https://github.com/BoruiGu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

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;
}

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: Thu, 02 Dec 2021 23:01:05 GMT
  • Dependencies: @types/request
  • Global values: none

Credits

These definitions were written by Alex Brick, and Borui Gu.

0.11.6

20 days ago

0.11.5

1 month ago

0.11.2

8 months ago

0.11.3

7 months ago

0.11.4

6 months ago

0.11.1

1 year ago

0.11.0

2 years ago

0.9.2

3 years ago

0.9.1

6 years ago

0.9.0

6 years ago