Skip to content

Commit

Permalink
better detection for whether the console prototype hack logger will work
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Baumgart committed Aug 16, 2012
1 parent e19d79c commit 96d5a70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions filters/logger/logger.js
Expand Up @@ -5,9 +5,10 @@ function Logger() {
} }
} }


if (typeof console !== 'undefined' && typeof console.log === 'function') { try {
Logger.prototype = console; Logger.prototype = console;
} else { // for the dreaded IE, which doesn't allow console.log.apply (new Logger).groupEnd();
} catch (e) {
function getLogFunction(name) { function getLogFunction(name) {
return function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { return function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
if (typeof console !== 'undefined') { if (typeof console !== 'undefined') {
Expand Down

0 comments on commit 96d5a70

Please sign in to comment.