Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

node-syslog-client-bsd

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

node-syslog-client-bsd

Wrapper for https://www.npmjs.com/package/syslog-client package

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

node-syslog-client-bsd

Wrapper for https://www.npmjs.com/package/syslog-client package

Install

yarn add node-syslog-client-bsd or npm i node-syslog-client-bsd

Usage

Import package


const SyslogClient = require("node-syslog-client-bsd");

new SyslogClient(IP, [options]);

Return new instance of SyslogClient (constructor)

const options = {
  syslogHostname: 'home-api.local',
};

const logClient = new SyslogClient('10.0.0.15', options);

SyslogClient.getClient()

Return the instance of syslog-client based on syslog-client package

SyslogClient.setProgram(program)

sets the program for all calls according to the setter

SyslogClient.resetProgram()

reset the program for all calls according to the reset

SyslogClient.setFacility(facility)

sets the facility for all calls according to the setter

SyslogClient.resetFacility()

reset the facility for all calls according to the reset

log(message, [program], [options])

  • message: message to log
  • [program]: set the program specific for one log. Default N/A
  • [options]: options based on syslog-client options. It overloads what you've already set up

you have access to all these functions depending on the level

logClient.info('Log infos!');
logClient.warning('Log warning!');
logClient.error('Log error!');
logClient.debug('Log debug!');
logClient.emergency('Log emergency!');
logClient.alert('Log alert!');
logClient.critical('Log critical!');
logClient.notice('Log notice!');

Example

You can find an example in ./example/index.js. The screenshot below shows you its result (on an Synology NAS)

syslog-alt

Changelog

March 2019

  • Init project

Keywords

syslog

FAQs

Package last updated on 09 Apr 2019

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