Open travikk opened 5 years ago
Pino does not log the line at which the log method was invoked. https://github.com/pinojs/pino-caller adds such functionality in Node, but I don't know about the browser.
@jsumners so console does this automatically, when you invoke any of the loggers (i.e. console.debug); but because those are invoked from browser.js, it's that file that gets reported to the browser's console.
Here's a possible solution:
PRs are welcome.
Hey,
Using standard config for pino:
when I try to log anything, chrome console doesn't show the correct file:line from where the log initiates, but rather shows
browser.js:174
(which basically corresponds to pino internals).Ideally, this is fixed and when I put a log statement anywhere in the code, the actual filename and line is reported.