Skip to content

Instantly share code, notes, and snippets.

@Bear-Foot
Forked from RReverser/better-console-log.js
Last active August 29, 2015 14:21
Show Gist options
  • Save Bear-Foot/2126715d99000e0917a7 to your computer and use it in GitHub Desktop.
Save Bear-Foot/2126715d99000e0917a7 to your computer and use it in GitHub Desktop.
// UPD:
// Now available as npm module!
// Check out https://github.com/RReverser/better-log for details.
console.log = (function (log, inspect) {
return function () {
return log.apply(this, Array.prototype.map.call(arguments, function (arg) {
return inspect(arg, { depth: 1, colors: true });
}));
};
})(console.log, require("util").inspect);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment