We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Occasionally I will add console messages at the beginning of each function usually when beginning to review code I'm not familiar with.
Add a check for url parameter to enable or disable any logging.
// example window.log = function f() { log.history = log.history || []; log.history.push(arguments); if (this.console) { var args = arguments, newarr; args.callee = args.callee.caller; newarr = [].slice.call(args); if (typeof console.log === 'object') log.apply.call(console.log, console, newarr); else console.log.apply(console, newarr); } }; options={ 'debug': window.location.href.indexOf('?debug=true') > -1 } options.log = options.debug ? function () { console && console.log.apply(console, arguments); } : function () {};
Add a parameter to output a log message for every function call. Something like console.log([class] method);
// example function augment(withFn) { var name, fn; for (name in window) { fn = window[name]; if (typeof fn === 'function') { window[name] = (function(name, fn) { var args = arguments; return function() { withFn.apply(this, args); return fn.apply(this, arguments); } })(name, fn); } } } augment(function(name, fn) { console.log([class]: fn); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Occasionally I will add console messages at the beginning of each function usually when beginning to review code I'm not familiar with.
Add a check for url parameter to enable or disable any logging.
Add a parameter to output a log message for every function call. Something like console.log([class] method);
The text was updated successfully, but these errors were encountered: