3.0.0 • Published 7 years ago

winston-tcp v3.0.0

Weekly downloads
238
License
ISC
Repository
github
Last release
7 years ago

Winston TCP version License

TCP transport for Winston

Build Status Downloads Code Climate Coverage Status Dependency Status Dependencies

Install

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

API

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:

import winston from 'winston'
import Transport from 'winston-tcp'

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

winston.info('foo')

Options

NameDescriptionDefault
hostThe host to connect tonone
portThe server port to connect tonone
reconnectIntervalTime to pause between disconnect and reconnect (in ms)1000
bufferLengthNumber of messages to buffer while disconnected, set to false for unlimited10000
jsonIf true, messages will be logged as JSONfalse
timestampflag indicating if we should prepend output with timestampsfalse
formattera custom formatter (see Winston docs)none

:copyright: ahmadnassri.com  ·  License: ISC  ·  Github: @ahmadnassri  ·  Twitter: @ahmadnassri

3.0.0

7 years ago

2.0.0

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

8 years ago

1.1.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago