The rules of where require finds the files can be a little complex, but a simple rule of thumb is that if the file doesn't start with "./" or "/", then it is either considered a core module (and the local Node.js path is checked), or a dependency in the local node_modules folder. This example is different! Example: console.log('count: %d', count); If formating elements are not found in the first string then util.inspect is used on each argument. The basic power of those tools might be attractive enough for you to consider switching. console.warn() # console.error() # Same as console.log but prints to stderr. See util.format() for more infomation. The console.log() method is used to print to stdout with newline. A Console class with methods such as console.log(), console.error() and console.warn() that can be used to write to any Node.js stream. console.log (A); Parameters: It accepts a parameter which can be an array, an object or any message. console.info() # Same as console.log. The console.log () is a function in JavaScript which is used to print any kind of variables defined before in it or to just print any message that needs to be displayed to the user. It’s easy to use, native to the platform, and easy to read. The result is displayed in the Command Line Interface. Return value: It returns the value of the parameter given. console.dir(obj) # The console module is usually the first tool Node.js developers reach for when handling logging in an application. Node.js - Console - Node.js console is a global object and is used to print different levels of … But then you might stumble upon a logging framework like Winston or Bunyan. Like printf() the function can take multiple arguments. A global console instance configured to … console.log('The result is displayed in the Command Line Interface'); C:\Users\My Name>node demo_intro_cmd.js.