Socket
Socket
Sign inDemoInstall

@hinted-public/winston-tcp

Package Overview
Dependencies
30
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @hinted-public/winston-tcp

TCP transport for Winston


Version published
Weekly downloads
50
decreased by-79.42%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 02 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc