-
Notifications
You must be signed in to change notification settings - Fork 105
Closed
Description
Currently the line numbers are lost: showing as index.js
which points to where the console.log is being called
This picture shows as vendor.bundle.js
because I had --sourcemap=false
on.
I did managed to get it to show the "correct" file/line like so:
But with a major downside, and that is having to make the call with extra ()
.
// before
this.logger.trace('Hi there');
// after
this.logger.trace('Hi there')();
// changes
this.logger.trace('Hi there') // returns a "formatted console.log function"
// so executing right after would result into showing the right file/line number
To avoid breaking the api, we could set a flag to make it either log directly or return a function.
I can't think of a "pretty" way of doing this though. Any thoughts?
Tom4U, Mihai238, m4limo and xinthose
Metadata
Metadata
Assignees
Labels
No labels