Skip to content

Releases: fullstackers/socket.io-logger

Dependency Updates

02 Oct 16:06
Compare
Choose a tag to compare

Updated dependencies

Logger middleware for Socket.io

29 Jun 17:55
Compare
Choose a tag to compare

Log all events going into your socket.io application.

var fs = require('fs');
var options = {stream:fs.createWriteStream('/var/log/app.events', {flags:'a'})};
var logger = require('socket.io-logger');
var io = require('socket.io')(3000);
io.use(logger(options));
io.on('connection', function (sock) {
  sock.on('some event', function (data) {
    sock.emit('another event', data);
  });
});