1

I would like to know the line of code that the statement is on when I use console.log(). For example:

// line 12
console.log('hello'); // would output 13: hello

Is this possible to do programatically?

function newLog(art){
  // find line here but how
  return console.log(line, arg)
}
jennifer
  • 682
  • 5
  • 14
  • 2
    See https://stackoverflow.com/questions/45395369/how-to-get-console-log-line-numbers-shown-in-nodejs – Zircoz Jun 23 '20 at 19:49

0 Answers0