Languages
[Edit]
EN

Node.js - console.log in NodeJS

9 points
Created by:
Jan-Alfaro
681

In this short article, we would like to answer the question: how to print console logs in NodeJS?

Quick solution (example index.js file):

console.log('Some log here ...');
console.info('Some info here ...');
console.warn('Some warning here ...');
console.error('Some error here ...');

Running with:

node ./index.js

VS Code's Debug Console output:

Console logs with VS Code's Debug Console as output.

Alternative titles

  1. Node.js - print in console
  2. Node.js - write to stdout
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join