Get console wrapper to log message on correct line [duplicate]
问题 This question already has answers here : Getting Chrome's console.log to display the line that called a function (2 answers) Closed 5 years ago . I created a wrapper for console logging. I have been unable to get it to display the logged line number that the wrapper function is called from. I have looked at other posts to handle this but I cannot seem to get what they mentioned. They were basically binding the console.log to the external function but I need to do other work inside before its