# @types/syslog-client

> TypeScript definitions for syslog-client

Latest version **1.1.5** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/syslog-client
pnpm add @types/syslog-client
yarn add @types/syslog-client
bun add @types/syslog-client
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.5 |
| Published | 2023-11-07 |
| First published | 2019-11-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51420 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/syslog-client
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/syslog-client
- npm.io page: https://npm.io/package/@types/syslog-client

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 1.1.5 (latest) — 2023-11-07
- 1.1.2 (ts3.6) — 2021-07-02
- 1.1.1 (ts3.0) — 2020-05-15
- 1.1.0 (ts2.8) — 2019-11-14
- 1.1.4 — 2023-10-18
- 1.1.3 — 2023-09-25

## README

# Installation
> `npm install --save @types/syslog-client`

# Summary
This package contains type definitions for syslog-client (https://github.com/paulgrove/node-syslog-client).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/syslog-client.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/syslog-client/index.d.ts)
````ts
/// <reference types="node" />

import { EventEmitter } from "events";

export enum Transport {
    Tcp = 1,
    Udp = 2,
}

export enum Facility {
    Kernel = 0,
    User = 1,
    System = 3,
    Audit = 13,
    Alert = 14,
    Local0 = 16,
    Local1 = 17,
    Local2 = 18,
    Local3 = 19,
    Local4 = 20,
    Local5 = 21,
    Local6 = 22,
    Local7 = 23,
}

export enum Severity {
    Emergency = 0,
    Alert = 1,
    Critical = 2,
    Error = 3,
    Warning = 4,
    Notice = 5,
    Informational = 6,
    Debug = 7,
}

export interface ClientOptions {
    syslogHostname?: string | undefined;
    port?: number | undefined;
    tcpTimeout?: number | undefined;
    facility?: Facility | undefined;
    severity?: Severity | undefined;
    rfc3164?: boolean | undefined;
    appName?: string | undefined;
    dateFormatter?: (() => string) | undefined;
    transport?: Transport | undefined;
    timestamp?: Date | undefined;
    msgid?: string | undefined;
}

export interface MessageOptions {
    syslogHostname?: string | undefined;
    facility?: Facility | undefined;
    severity?: Severity | undefined;
    rfc3164?: boolean | undefined;
    appName?: string | undefined;
    timestamp?: Date | undefined;
    msgid?: string | undefined;
}

export class Client extends EventEmitter {
    constructor(target?: string, options?: ClientOptions);
    buildFormattedMessage(message: string, options: MessageOptions): Buffer;
    close(): Client;
    log(message: string, options?: MessageOptions, cb?: (error: Error | null) => void): Client;
    getTransport(cb: (error: Error | null, transport: Transport) => void): void;
    onClose(): Client;
    onError(error: Error): Client;
}

export function createClient(target: string, options: ClientOptions): Client;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Romain CONNESSON](https://github.com/helorem).

---
_Source: https://npm.io/package/@types/syslog-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
