Is it possible to use some javascript tricks to tell console.logthe line number that it should output?
Suppose we have the following simple example:
function Logger () {
this.debug = function(msg) {
console.log(msg);
};
}
var log = new Logger();
log.debug("Hello");
If you open the page, Chrome shows this:

This means that the message has been logged on main.js:4, but I really want it to show main.js:9. Because line 9 is where the registrar is called. For this simple case, this does not really matter, but when Logger is in a separate file, it always shows logger.jsinstead of the class that the registrar called.
Logger (, ), this.debug = console.log.
EDIT:
, , :