New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

syslog-server

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

syslog-server

NodeJS Syslog Server

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

SyslogServer

NodeJS Syslog Server.

Quickstart

Installation
$ npm install syslog-server
Usage
const SyslogServer = require("syslog-server");
const server = new SyslogServer();

server.on("message", (value) => {
    console.log(value.date);     // the date/time the message was received
    console.log(value.host);     // the IP address of the host that sent the message
    console.log(value.protocol); // the version of the IP protocol ("IPv4" or "IPv6")
    console.log(value.message);  // the syslog message
});

server.start();

Functions

.start([options], [callback])
  • options - Optional - The options passed to the server. Supports the following properties:

    • port [Number] - Optional - Defaults to 514.
    • address [String] - Optional - Defaults to "0.0.0.0".
    • exclusive [Boolean] - Optional - Defaults to true.

    For more informatio on the options object, check NodeJS oficial API documentation.

  • callback [Function] - Optional - Callback function called once the server starts, receives an error object as argument should it fail.

  • The start function returns a Promise.

    .stop([callback])
    • callback [Function] - Optional - Callback function called once the server socket is closed, receives an error object as argument should it fail.

    The stop function returns a Promise.

    .isRunning()

    The isRunning function is a synchronous function that returns a boolean value, if the server is ready to receive syslog messages or not.

    Events

    • start - fired once the server is ready to receive syslog messages
    • stop - fired once the server is shutdown
    • error - fired whenever an error occur, an error object is passed to the handler function
    • message - fired once the server receives a syslog message

Keywords

syslog

FAQs

Package last updated on 29 Sep 2017

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