1.0.1 • Published 6 years ago

@p4d/socket-logs v1.0.1

Weekly downloads
14
License
WTFPL
Repository
-
Last release
6 years ago

Socket Logs

Description

Small NPM package that receives a socket io connection instance and prints on the console generic data about the connection, errors, and disconnects

Installation

npm install --save @p4d/socket-logs

Usage

Require package

	const socketLogs = require('@p4d/socket-logs')

Create hermes object

var io = socketio.listen(config.socket.port)
io.on('connection', (socket) => {
	socketLogs.start(socket)
})

Future updates

Logs are currently printed on the console, may be worth exploring logging to a specific file or somewhere else