npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

winston-logstash-salim

v1.1.0

Published

A winston@3 replacement for both winston-logstash and winston-logstash-udp to facilitate either TCP or UDP traffic to logstash

Downloads

5

Readme

winston3-logstash-transport

NPM

Actual version published on npm Travis build status Total npm module downloads Codacy Badge Codacy Coverate Badge Dependencies badge

A winston@3 transport for LogStash.

This winston transport has been rewritten from both winston-logastah and winston-logstash-udp to use the new Transport behavior from winston@3.

Where possible, this has been updated to mimic the behaviors of the original modules. There are some changes that have been made to allow the transport to handle either TCP or UDP connections to LogStash, instead of being dedicated to a single transport-layer protocol.

Usage

const Winston = require('winston');
const WinstonLogStash = require('winston3-logstash-transport');

const logger = Winston.createLogger();

logger.add(new WinstonLogStash({
  mode: 'udp',
  host: '127.0.0.1',
  port: 28777
}));

logger.error('Some Error');

API

constructor(options)

Create a new Logstash Transport

options

| Name | Type | Description | Valid Values | Default | TCP | UDP | |------|------|-------------|--------------|---------|-----|-----| | mode | string | The protocol to use to connect to LogStash. tcp is an alias for tcp4 and udp is an alias for udp4. | udp udp4 udp6 tcp tcp4 tcp6 | 'udp4' | ✔️ | ✔️ | | localhost | string | The hostname sent to LogStash | Any | os.hostname | ✔️ | ✔️ | | host | string | The LogStash server ip or hostname | Any valid IP or host address | 127.0.0.1 (ip4)::0 (ip6) | ✔️ | ✔️ | | port | integer | The LogStash server port number | Any integer | 28777 | ✔️ | ✔️ | | applicationName | string | The application name sent to LogStash | Any | process.title | ✔️ | ✔️ | | pid | string | The Operating System process ID for this process | Any valid PID | process.pid | ✔️ | ✔️ | | silent | boolean | Offline/Silent mode enabled | | false | ✔️ | ✔️ | | maxConnectRetries | integer | The number of attempts to reconnect to make before erroring out | Any integer | 4 | ✔️ | ✔️ | | timeoutConnectRetries | integer | The number of milliseconds to wait between connection attempts | Any integer | 100 | ✔️ | ✔️ | | label | string | The LogStash label to send with the information | Any | process.title | ✔️ | ✔️ | | sslEnable | boolean | Whether SSL/TLS connection should be attempted when connecting via TCP | | false | ✔️ | | | sslKey | filepath | The filepath to the SSL Key | Any valid filepath | '' | ✔️ | | | sslCert | filepath | The filepath to the SSL Cert | Any valid filepath | '' | ✔️ | | | sslCA | filepath or Array(filepaths) | The filepath(s) to the Certificat Authority (CA) Intermediary Certs | Any valid filepath(s) | '' | ✔️ | | | sslPassPhrase | string | The SSL Cert PassPhrase (if any) | Any | '' | ✔️ | | | rejectUnauthorized | boolean | Enable connection rejection when cert is not valid | | false | ✔️ | | | trailingLineFeed | boolean | Enable appending end of line character to UDP output | | false | | ✔️ | | trailingLineFeedChar | string | The type of end of line character(s) to append to UDP output | Any | os.EOL | | ✔️ |

License

Copyright (c) 2018, 2019 Jay Reardon

Copyright (c) 2019 Out of Sync Studios LLC -- Licensed under the MIT license.