Skip to content

Instantly share code, notes, and snippets.

@maephisto
Created August 28, 2017 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maephisto/f57403651c4256a7f949715d19bc09d7 to your computer and use it in GitHub Desktop.
Save maephisto/f57403651c4256a7f949715d19bc09d7 to your computer and use it in GitHub Desktop.
A expressive layer added on top of Javascript's `console` to better illustrate what that voice in your mind is saying.
var _log = console.log;
var _error = console.error;
var _warning = console.warn;
console.error = function (errMessage) {
errMessage = 'Ooooh 💩💩💩 : ' + errMessage;
_error.apply(console, arguments);
};
console.log = function (logMessage) {
logMessage = '👉 💯 ' + logMessage;
_log.apply(console, arguments);
};
console.warn = function (warnMessage) {
warnMessage = '⚠️ Potential 💩💩💩 here: ' + warnMessage;
_warning.apply(console, arguments);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment