remote-logger

0.0.1 • Public • Published

Remote-Logger

Remote-Logger is a tiny library for logging error and info on ours nodejs aplications, its use DEBUG library for logging into console and socketIO for send those logs message thrown web socket to others users.

Install

npm install git@github.com:BlaShadow/Remote-Logger.git

How to use

if you're using Socket.io on your project just initialize the library with the instance of io.

var io = ..
var log = require('Remote-Logger')(io);

With express

Like any socketIO app

var app = require('express').createServer();

var log = require('Remote-Logger')(app);

log.info("Hello world");

log.error("it's failling dude!!!");

log.fatal('this is bad!!',{ some:"data" });

How to use on client side

Its just like include socket.io library and listen to 3 mayor events that the library its emiting.

  • log
  • connection (from socket.io)
  • disconnect (from socket.io)

and those events too

  • log-info
  • log-error
  • log-debug
  • log-faltal

Readme

Keywords

Package Sidebar

Install

npm i remote-logger

Weekly Downloads

1

Version

0.0.1

License

BSD

Last publish

Collaborators

  • blashadow