Socket
Socket
Sign inDemoInstall

logwrap

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logwrap

Verbose logger module to debug classes in node.js and your browser.


Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

logwrap.js

Verbose logger module to debug classes in node.js and your browser.

Why?

Debugging complex classes with console.log feels wrong.

Installation

npm install [--save-dev] logwrap

Examples

Debugging classes:

var logwrap = require('logwrap');

function MyClass () { /*...*/ }
MyClass.prototype.myMethod = function (a, b, c) { /*...*/ };

var instance = new MyClass();
logwrap.debugClass(MyClass); // enable debugging
instance.myMethod(1, 2, 3); // logs to console
logwrap.debugClass(MyClass, false); // disable debugging

Debugging functions:

var logwrap = require('logwrap');

function complexFunctionA (arg1, arg2) { /*...*/ };
complexFunctionB = function (argA, argB) { /*...*/ };

complexFunctionA = logwrap.wrapFunction(complexFunctionA);
complexFunctionB = logwrap.wrapFunction(complexFunctionB, 'complexFunctionB');

complexFunctionA(3.14159, 47); // logs to console
complexFunctionB('Apple', 'Banana'); // logs to console

Keywords

FAQs

Package last updated on 07 May 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc