Apply for Zend Framework Certification Training


Node.js logging is an important part of supporting the complete application life cycle. From creation to debugging to planning new features, logs support us all the way. By analyzing the data in the logs, we can glean insights, resolve bugs much quicker, and detect problems early and as they happen.

Here we will talk about the who, what, when, where, how, and why of Node.js logging. Later in this post, the “how” section will give insights into using code. But to kick it off, we’ll briefly cover who uses logs.

Here are common levels of Node.js logging:

1) error
2) warn
3) info
4) verbose
5) debug
Each of these can be loosely correlated with a specific purpose. 
In the built-in Node.js console log, all logging levels equate to either log or error. 
The different levels of logging give us a way to treat log events differently.

< NodeJS Program Lifecycle Associations in sequelize >

Ask a question

  • Question:
    • Answer:
      {{answer.blog_answer_description  }}
    Replay to Question

Back to Top