Please make sure you read and understand this before moving forward: TOPICS: Logging
Why we would like to log
The most basic form of logging in javascript is console logging
The console object provides access to the browser’s debugging console and though it might differ from browser to browser they’re a set of functions common to all see more features here
console.log('Logging in Node and JS');
Log Levels
But, as you know, there are multiple ways and places one can log to, like output logs in a file or on a reporting tool or intecepting a request to the backend. For such activities you might need more than just console.logging. Lucky for us Node provides a few options for this.
Resources for reading