You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

console-debug

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-debug

Replaces the console object with a more stylish and practical way of displaying messages.

0.4.2
latest
Source
npmnpm
Version published
Weekly downloads
3
-50%
Maintainers
1
Weekly downloads
 
Created
Source


What it does

Replaces your console object with a more stylish and practical way of displaying notices,warn,info,debug,log and errors.
It automagically shows you the line number and filename where the command was executed, along with a timestamp.
There is also the ability to catch uncaughtExceptions, disable the output colors, and log to file.
You can also setup filters if you want to hide certain debug message types.

DEMO

Changelog

https://github.com/michaeldegroot/console-debug/commits/master

Getting Started

1. Start by installing the package:
npm install console-debug
2. Load the code
var Debug = require('console-debug')

var console = new Debug({
	uncaughtExceptionCatch: false,                   // Do we want to catch uncaughtExceptions?
	consoleFilter:          ['LOG', 'WARN'],         // Filter these console output types
	logToFile:              true,                    // if true, will put console output in a log file folder called 'logs'
	logFilter:              ['LOG','DEBUG','INFO'],  // Examples: Filter these types to not log to file
	colors:                 true                     // do we want pretty pony colors in our console output?
})
3. Do awesome stuff!
console.log("I am a log!")
console.warn("I am a warn!")
console.error("I am a error!")
console.debug("I am a debug!")
console.info("I am a info!")

// can also display objects
obj = {
	test1: [1,2,3,4],
	test3: ["ohai","there"],
	test4: true
}
console.log(obj)

Contact

You can contact me at specamps@gmail.com

Keywords

debug

FAQs

Package last updated on 12 Nov 2016

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.