I have a static class in javascript...
var Logger = {
logtofirefox: function (str, priority) {
console.log(str);
},
logtoie: function (str, priority) {
alert(str);
}
}
I call it like this from another file...
Logger.log('Hello World');
But I want to inject the string 'log : ' before the words 'Hello World' on all functions.
Wondering if this is possible with minimum fuss?
Logger.log('Hello World');would throw a TypeError: Object #<Object> has no method 'log'