Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

udp-transport-winston

Package Overview
Dependencies
Maintainers
0
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

udp-transport-winston

A winston transport for UDP in typescript

  • 2.0.15
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1K
decreased by-2.17%
Maintainers
0
Weekly downloads
 
Created
Source

Github Actions Status npm NPM

UDP-transport-winston

A simple winston transport for UDP in typescript.

Working with winston@3.

Can be used with splunk, logstash (ELK) or any other UDP data inputs.

Usage

Installing

using npm:

npm install winston udp-transport-winston --save

using yarn:

yarn add winston udp-transport-winston

Example

import winston = require('winston');
import { UDPTransport } from 'udp-transport-winston';

const logger: winston.Logger = winston.createLogger({
    level: 'info',
    transports: [
        new UDPTransport({
            host: 'localhost',
            port: 1234
        })
    ]
});

or:

import winston = require('winston');
import { UDPTransport } from 'udp-transport-winston';

const logger: winston.Logger = winston.createLogger({
    level: 'info'
});

logger.add(new UDPTransport({
    host: 'localhost',
    port: 1234
}));

API

  • class UDPTransport
    • constructor(options:TransportOptions)
      • options.host:string UDP host
      • options.port:number UDP port
      • (optional) options.trailingLineFeed:boolean if to make single line
      • (optional) options.trailingLineFeedChar:string character to separate messages
      • (optional) Inherited transport options: options.format, options.level, options.silent, options.handleExceptions

Made by @raz6tamir

Keywords

FAQs

Package last updated on 19 Nov 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc