log4js-socket.io
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

Socket.io Appender for log4js-node

Plugin for log4js > 2.x

npm install log4js-socket.io

Configuration

  • type - log4js-socket.io
  • name - string (optional, defaults to log4js)
  • env - string (optional, defaults to dev)
  • event - string (optional, defaults to log4js)
  • layout - object (optional, defaults to messagePassThroughLayout) - the layout to use for log events (see layouts).

The appender will use the Redis PUBLISH command to send the log event messages to the channel.

Example

log4js.configure({
  appenders: {
    io: { type: 'log4js-socket.io',url:'ws://io.net',name:'crm',env:'dev' }
  },
  categories: { default: { appenders: ['io'], level: 'info' } }
});

Package Sidebar

Install

npm i log4js-socket.io

Weekly Downloads

0

Version

1.2.0

License

Apache-2.0

Unpacked Size

15.4 kB

Total Files

5

Last publish

Collaborators

  • imbooo