# winston-tcp

> TCP transport for Winston

Latest version **3.0.0** (published 2017-05-16) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install winston-tcp
pnpm add winston-tcp
yarn add winston-tcp
bun add winston-tcp
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2017-05-16 |
| First published | 2015-04-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Ahmad Nassri |
| Maintainers | ahmadnassri |
| Keywords | log, logging, logs, sysadmin, tcp, tools, transport, winston |

## Links

- npm: https://www.npmjs.com/package/winston-tcp
- Repository: https://github.com/ahmadnassri/winston-tcp
- Issues: https://github.com/ahmadnassri/winston-tcp/issues
- npm.io page: https://npm.io/package/winston-tcp

## Dependencies (1)

- [winston](https://npm.io/package/winston.md) ^2.3.1

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 3.0.0 (latest) — 2017-05-16
- 2.0.0 — 2016-12-13
- 1.1.5 — 2016-12-09
- 1.1.4 — 2016-12-08
- 1.1.3 — 2016-12-08
- 1.1.2 — 2016-01-11
- 1.1.0 — 2015-10-21
- 1.0.1 — 2015-04-16
- 1.0.0 — 2015-04-16

## README

# Winston TCP [![version][npm-version]][npm-url] [![License][license-image]][license-url]

> TCP transport for [Winston](https://github.com/winstonjs/winston)

[![Build Status][travis-image]][travis-url]
[![Downloads][npm-downloads]][npm-url]
[![Code Climate][codeclimate-quality]][codeclimate-url]
[![Coverage Status][codeclimate-coverage]][codeclimate-url]
[![Dependency Status][dependencyci-image]][dependencyci-url]
[![Dependencies][david-image]][david-url]

## Install

```bash
npm install --only=production --save winston-tcp
```

## API

```js
import Transport from 'winston-tcp'

let logger = new (winston.Logger)({
  transports: [
    new (Transport)({
      host: '127.0.0.1',
      port: 1337,
      json: true,
      timestamp: true
    })
  ]
})

logger.log('info', 'foo')
```

or simply:

```js
import winston from 'winston'
import Transport from 'winston-tcp'

winston.add(new Transport({
  host: '127.0.0.1',
  port: 1337
}))

winston.info('foo')
```

## Options

Name                | Description                                                                   | Default
------------------- | ----------------------------------------------------------------------------- | -------
`host`              | The host to connect to                                                        | none
`port`              | The server port to connect to                                                 | none
`reconnectInterval` | Time to pause between disconnect and reconnect (in ms)                        | `1000`
`bufferLength`      | Number of messages to buffer while disconnected, set to `false` for unlimited | `10000`
`json`              | If `true`, messages will be logged as JSON                                    | `false`
`timestamp`         | flag indicating if we should prepend output with timestamps                   | `false`
`formatter`         | a custom formatter (see Winston docs)                                         | none

---
> :copyright: [ahmadnassri.com](https://www.ahmadnassri.com/)  · 
> License: [ISC][license-url]  · 
> Github: [@ahmadnassri](https://github.com/ahmadnassri)  · 
> Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri)

[license-url]: http://choosealicense.com/licenses/isc/
[license-image]: https://img.shields.io/github/license/ahmadnassri/winston-tcp.svg?style=flat-square

[travis-url]: https://travis-ci.org/ahmadnassri/winston-tcp
[travis-image]: https://img.shields.io/travis/ahmadnassri/winston-tcp.svg?style=flat-square

[npm-url]: https://www.npmjs.com/package/winston-tcp
[npm-version]: https://img.shields.io/npm/v/winston-tcp.svg?style=flat-square
[npm-downloads]: https://img.shields.io/npm/dm/winston-tcp.svg?style=flat-square

[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/winston-tcp
[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/winston-tcp.svg?style=flat-square
[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/winston-tcp.svg?style=flat-square

[david-url]: https://david-dm.org/ahmadnassri/winston-tcp
[david-image]: https://img.shields.io/david/ahmadnassri/winston-tcp.svg?style=flat-square

[dependencyci-url]: https://dependencyci.com/github/ahmadnassri/winston-tcp
[dependencyci-image]: https://dependencyci.com/github/ahmadnassri/winston-tcp/badge?style=flat-square

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