DefinitelyTyped/types/winston-syslog/index.d.ts

35 lines
1.0 KiB
TypeScript

// Type definitions for winston-syslog 2.0
// Project: https://github.com/winstonjs/winston-syslog, https://github.com/indexzero/winston-syslog
// Definitions by: Chris Barth <https://github.com/cjbarth>, Felix Hochgruber <https://github.com/felix-hoc>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
import * as Transport from 'winston-transport';
import * as dgram from 'dgram';
import * as net from 'net';
export interface SyslogTransportOptions extends Transport.TransportStreamOptions {
host?: string;
port?: number;
path?: string;
protocol?: string;
pid?: number;
facility?: string;
localhost?: string;
type?: string;
app_name?: string;
eol?: string;
}
export interface SyslogTransportInstance extends Transport {
producer: any;
socket: dgram.Socket | net.Socket;
connect(callback: (err: (true | null)) => any): void;
new(options?: SyslogTransportOptions): SyslogTransportInstance;
}
export const Syslog: SyslogTransportInstance;