Skip to content

jaymoretti/Logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logger

console.log++

by Jay Moretti

It's often very easy to get lost in a sea of console.log calls. Sometimes you forget to clear them before sending the project to production. Sometimes you need more than a simple output. That's the reason why this console.log extension exists.

Basic Usage:

	console.log(arguments);

Other features:

	window.logger.debugOn(true | false); // turns log output on/off globally
	window.logger.isCompiled(true | false); // outputs function where the log happened instead of file where the log happened.

Sample Call:

	var object = {
		prop1 : [0, 1, 2, 3, 4],
		prop2 : "This is a String",
		prop3 : {"prop1" : "meh"}
	};
	console.log(object.prop1, object.prop2, object.prop3);

Output:

alt text

Build:

Builds are created by uglyfying and merging /src/libs/stacktrace.js and /src/utils/log/log.js together using Uglify-js2

Licensing

published under the MIT license

This Log polyfil depends on Javascript Stack Trace by Eric Wendelin (2008), Luke Smith (2008), Loic Dachary (2008), Johan Euphrosine (2008), Oyvind Sean Kinsey (2010), Victor Homyakov (2010).

About

Console.log++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published