File/Line numbers?
See original GitHub issueCurrently 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?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:23 (11 by maintainers)
Top Results From Across the Web
Is there an easy way to tell which line number a file pointer is ...
Is there either a Python built-in or extension to easily track and "tell" what line number a text file pointer is on? Note:...
Read more >Linux/Unix: Cat Command Display Line Numbers - nixCraft
Explains how to use the cat or nl command to line numbers for your text or program files under Linux or Unix like...
Read more >Add line numbers to standard output of text files - Ubunlog
Add line numbers to standard output of text files in terminal · 1.1 Using the nl command · 1.2 Using the cat command...
Read more >How To Add Line Numbers To Text Files On Linux - OSTechNix
The cat command is used to display the contents of a file. If you want to add numbers to the output of a...
Read more >How to print line numbers of a file in Python? - EasyTweaks.com
Get and print line numbers in a file. Use the Python enumerate function to loop through a text or csv file and then,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dbfannin 😭 Okay, i try to find another way. Thank you for giving updated information. (Korean references are not up-to-date translations.)
filename:line number is now supported in ngx-logger@2.2.0. Hopefully this helps!