Console-trace - console.log improvement for Node.js
On March 25, a small console-trace module appeared in the repositories of the LearnBoost company, widely known in the Node.js community thanks to the Socket.io, mongoose, cluster projects . This is a small but useful addition to the console.log () function, which was previously only available in browser consoles - displaying the file name and line number from which console.log () is called.
Using the module is very simple:
and
Using the module is very simple:
npm install console-trace
and
require ("console-trace");
console.t.log("Hello!");
// или
console.trace.log("Hello!");
// вместо
console.log("Hello!");