🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

mogger

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mogger

print colorful logs with AOP using meld

latest
Source
npmnpm
Version
0.1.14
Version published
Maintainers
1
Created
Source

#Mogger Build Status Coverage Status

Mogger it is a way to log your app without change him. Uses AOP (Aspect-oriented programming) library named meld.js and other library that facilitates the print of colorful outputs in browser, the colorful-logger.

The goal of this library is to be easy to configure and to help the programmer to understand the inner of some javascript codes.

Instalation

npm install mogger --save

Usage

var Mogger = require('Mogger');

// get the tracer
var tracer = new Mogger({
    // list of targets
    surrogateTargets: [
        { title: 'SIMPLE_OBJ', target: simpleObj }
    ]
});

// start watching some targets
tracer.traceObj({
  before: { message: 'SimpleObj -> ', css: 'color: #A42' },
  targetTitle: 'SIMPLE_OBJ', targetConfig: { css: 'color: #E42' }
});

Testing

// test all + watch
gulp

// test something(grep) + watch
mocha --watch -g 'REGEX_NAME_OF_TEST' -G

Testing and debugging

// test + watch
gulp

//instal tools
sudo npm install -g mocha
sudo npm install -g node-inspector

// debug + watch
node-debug _mocha --watch
// debug something(grep) + watch
node-debug _mocha --watch -g 'REGEX_NAME_OF_TEST'

Test coverage

# start coverage + watch
gulp coverage

# open "Code coverage report"
google-chrome coverage/lcov-report/src/index.html

Examples

  • here

by: saitodisse

Keywords

console

FAQs

Package last updated on 20 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts