@p4d/socket-logs
v1.0.1
Published
General logging for socket.io
Downloads
1
Keywords
Readme
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