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

@log4js-node/logfaces-udp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@log4js-node/logfaces-udp

LogFaces UDP Appender for log4js-node

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

logFaces Appender (UDP) for log4js-node

The logFaces appenders send JSON formatted log events to logFaces receivers. This appender uses UDP to send the events (there is another logFaces appender that uses HTTP). It uses the node.js core UDP support, so you do not need to include any other dependencies.

npm install log4js @log4js-node/logfaces-udp

Configuration

  • type - @log4js-node/logfaces-udp
  • remoteHost - string (optional, defaults to '127.0.0.1')- hostname or IP address of the logFaces receiver
  • port - integer (optional, defaults to 55201) - port the logFaces receiver is listening on
  • application - string (optional, defaults to empty string) - used to identify your application's logs

This appender will also pick up Logger context values from the events, and add them as p_ values in the logFaces event. See the example below for more details.

Example (default config)

log4js.configure({
  appenders: {
    logfaces: { type: '@log4js-node/logfaces-udp' }
  },
  categories: {
    default: { appenders: [ 'logfaces' ], level: 'info' }
  }
});

const logger = log4js.getLogger();
logger.addContext('requestId', '123');
logger.info('some interesting log message');
logger.error('something has gone wrong');

This example will result in two log events being sent via UDP to 127.0.0.1:55201. Both events will have a p_requestId property with a value of 123.

Keywords

FAQs

Package last updated on 11 Jul 2018

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