• Stars
    star
    113
  • Rank 310,115 (Top 7 %)
  • Language
    CSS
  • Created over 11 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Log client side/server side messages and monitor them with a realtime interface

(DEPRECATED) node-logman

node-logman provide a log interface that you can embed in your Node app.

Logman

Install it

$ npm install logman -g

Old

App with two loggers which permits to log client and server side events.

The server store the logs into Redis database and, if enabled, can disserve a realtime web interface to show you the last log messages.

Logman is here muha.

Testing this fast

git clone [email protected]:Alexandre-Strzelewicz/Logman.git
cd Logman
npm install
cd examples
node server.js

In another term :

node client.js

Then open your browser :

google-chrome "http://localhost:4444/#/server"

And see the realtime logs ;)

Stack

  • Redis
  • Node/Express
  • AngularJS
  • Socket.io

Standalone server

  • Timestamp all logs received
  • Store them to redis
  • Realtime web interface if enabled

API

This directly start the log server and the web interface :

var logServer = new LoggyServer({
    bind_port : 3044,             // logger port
    web_port : 4444,              // web interface port
    enableMonitoringPage : true,  // enable web interface
    enableClientSideLog : true    // enable routes for client side logging
});

Client side logging - logmanWeb.js

In order to log client side messages you must include logmanWeb.js in your pages. Messages are sent to the Logman server via JSONP, it doesn't need jQuery or other dependencies.

JSONP permits you to log events from web applications that runs under different domain names.

API

When you include logmanWeb.js to your web app, it directly binds logman to the window js variable.

By default window.onerror is overidded to catch all uncaught errors and send them to Logman.

--- Variables
logman.logman_url  // (str) Set the URL of the Logman server
logman.display     // (bool) Display logman logs - good for development
logman.remote(log/warn/error/exception) // Param which event should be sent to Logman

--- Methods
logman.log(msg)            // by default it just print a message
logman.warn(msg)           // send warn message to Logman
logman.error(msg)          // send error message to Logman
logman.notify(event, msg)  // send a custome event with msg to Logman

logman.monitor()           // Not implemented yet

Server side logging - logmanClient.js

Logger for server side applications, send events and custom message to Logman. Available in lib/logmanClient.js

Options

Init

var Logger = require('./path/to/logmanClient.js');

Logger.init({
   port : 3044,      // Port of the MessageBus.js server   
   ip : '127.0.0.1', // IP adress of the MessageBus.js server
   remote : true,    // Do the log should send data to MessageBus.js
   display : true    // Display log messages ? (for debug)
});

Usage

Custom events

If you want to throw custom events (user:signup for example) :

var log = require('./path/to/logmanClient.js').getCustomLogger();

// Will send { event : 'user:signup', msg : { dt : 'User alex registered' } }
log('user:signup', {dt : 'User alex registered'});

Prefixed custom events

Same event logger (TJ debug like)

If you want to use the same storage key (also a route with Messagebus.js):

var log = require('./path/to/logmanClient.js').getLogger('user:registration');

// Will send { event : 'user:registration', msg : 'User registered'}
log({msg : 'User registered'});

Express/Connect middleware logging - afflux-express.js

For documentation please reffer to : https://github.com/Alexandre-Strzelewicz/afflux-server.js

Just make sure that you use the same port for transiting the logs.

License

(The MIT License)

Copyright (c) 2013 Wiredcraft [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

pm2

Node.js Production Process Manager with a built-in Load Balancer.
JavaScript
41,442
star
2

gridcontrol

Networked Process Manager to execute functions in a Computer Grid
JavaScript
577
star
3

angular-bridge

Link models easily via a REST interface between Mongoose/Node-Express/Angular.js
JavaScript
208
star
4

pm2-deploy

Deploy part of PM2
JavaScript
178
star
5

pm2-interface

Deprecated
JavaScript
90
star
6

multissh

SSH into multiple machine to execute a command in parallel, with a convenient terminal UX
JavaScript
51
star
7

Skytoop

A Nice Desktop in Cloud with a filemanager and a lot of features ! Fork it ! Web2Py
JavaScript
30
star
8

cryptoengine

Monitor and verify transactions from a local or remote bitcoin deamon.
JavaScript
20
star
9

pm2-axon

JavaScript
19
star
10

pm2-axon-rpc

Modified version of visionmedia/axon-rpc
JavaScript
15
star
11

express-repl

Interact with express internal data (routes, settings...) with an auto reconnect remote repl
JavaScript
11
star
12

yeoman-jade-angularjs

Yeoman template with nice jade integration (Haml like)
JavaScript
10
star
13

scaleway-commander

Manage a fleet of scaleway servers
JavaScript
10
star
14

WebGL-solar-system

WebGL - Three.js v53 - Realistic solar system in WebGL
JavaScript
9
star
15

spiderlink

Simple, yet optimized application intercommunication within the same machine. Based on WS.
JavaScript
8
star
16

pm2-openstack

Nginx load balancing and hot edit + load monitoring and create VM triggers
7
star
17

gc-refresh-mode

Google Chrome & Emacs & File Save = Automatic Refresh. This plugin permits you to refresh AUTOMATICALLY google chrome when saving a file ! - Fell free to fork it and enhance it. It worth (I do not have enough time to maitain it) -
Python
6
star
18

pm2-dev

Development dashboard for pm2
JavaScript
6
star
19

ProjectManager

J2EE - Spring (MVC, Secutiry, Autowiring), Hibernate, PostgreSQL, ExtJS. Project manager
JavaScript
5
star
20

Web2Py-application-template

Application template for Web2Py including JS/CSS minification, logger...
JavaScript
5
star
21

Speak.js

Make your software speak, naturally
JavaScript
4
star
22

afflux-server.js

Standalone log server, that routes and send message logs to different db/bucket/table/realtime interface
JavaScript
4
star
23

InterBenchmark

Benchmarks script : Node.Js vs Ruby Rails vs Django vs WebPy vs J2EE-Spring vs Express vs Php - Nginx FastCgi Passenger Tomcat
Shell
3
star
24

coinvest

coinvest
JavaScript
3
star
25

youtube-to-mp3-UI

Your own youtubetomp3
JavaScript
3
star
26

micro-dot-files

dot files for low resources systems (.bashrc/.emacs.el/nodejs)
Shell
3
star
27

Empathy

Baby steps with Raspberry Pi & Node.js
JavaScript
3
star
28

Css-Sprite-AutoGen

Transform multiple images in one and gives css position - Avoid multiple request for each images - Web2Py application
JavaScript
2
star
29

test-repo

JavaScript
2
star
30

easy-voice

JavaScript
2
star
31

lensesly

lensesly
Ruby
2
star
32

companystats

JavaScript
2
star
33

GeonameLocal

GeonameLocal
Shell
2
star
34

Eschool

LMS
JavaScript
2
star
35

afflux-logger.js

Logger client for afflux server - namespaced and custom logger for logging specific events
JavaScript
2
star
36

high-summary

Retrieve title, image and summary of a web page
JavaScript
2
star
37

synapsis

JavaScript
2
star
38

Speak

Speak
JavaScript
2
star
39

node-v8tools

V8 profiler bindings
C++
2
star
40

Sputnik

Library to control Drone over 4G (Hybrid System) / Drone as API / Expose the world as an API
Python
2
star
41

Gsplitter

Gsplitter extension allows you to have a big preview of Google search results !
JavaScript
2
star
42

SoundcloudCommentsHider

Chrome extension - Automatically hide comments on Soundcloud.
JavaScript
1
star
43

nurse-api

Interface for seccomp-nurse
JavaScript
1
star
44

auto-ap

Shell
1
star
45

DeportedChat

JavaScript
1
star
46

.i3

C
1
star
47

storydata-htp

JavaScript
1
star
48

pm2-hub-rd

R&D on pub sub system
JavaScript
1
star
49

rails_snippets

Some rails snippets
1
star
50

Unification

Ruby
1
star
51

Quizzy

Quizzy
JavaScript
1
star
52

rails_template

rails new my_new_app -m rails_template/generate_template.rb
Ruby
1
star
53

carcass-auth-app

JavaScript
1
star
54

carcass-memoray

In memory storage with array.js
JavaScript
1
star
55

TAH-project

JavaScript
1
star
56

Monetify

Monetify
Ruby
1
star
57

mavlinkjs

JavaScript
1
star
58

release-test-check

JavaScript
1
star
59

Arduino_LoRa_SX12XX_Demo_Sensor-heltec-ab01

C
1
star
60

thinblog

Thin Wordpress Theme for Wordpress - Example : http://blog.hemca.fr
PHP
1
star
61

reach

1
star
62

jquery.heat-progressbar

Jquery plugin for drawing easily a progressbar with heat color
JavaScript
1
star
63

clem-remote

JavaScript
1
star
64

afflux-listener.js

JavaScript
1
star
65

Gamification

Ruby
1
star
66

OpenStreetMap

OpenStreetMap
JavaScript
1
star
67

AMNBS-boilerplate

Boilerplate/Structure App - Mongoose + Nodejs + Express + AngularJS + Boostrap + Compass
JavaScript
1
star
68

gc-refresh-mode-

Google Chrome & Emacs & File Save = Automatic Refresh. This plugin permits you to refresh AUTOMATICALLY google chrome when saving a file !
1
star
69

MDNotes

Live markdown editor with multiple accounts
JavaScript
1
star
70

youtube-download

JavaScript
1
star
71

afflux-express.js

Middlewares for Express to log access and errors to afflux-server.js
1
star