An Interest In:
Web News this Week
- April 2, 2024
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
July 27, 2022 02:08 pm GMT
Original Link: https://dev.to/omardulaimi/different-ways-to-log-messages-in-nodejs-4j9j
Different ways to log messages in Nodejs
How many ways do you know ?
According to my little research, there are 3 different ways you can log messages in .
1- .: We all know this one and have used it extensively in Javascript. What people don't know that under the hood it actually uses .. with a line break.
2- ..: Unlike the previous one, this outputs messages on the same line; so you're going to need to manually add like breaks.
3- .: Also requires manual line breaks. Writes to .. like .. This method though is a little unique. It takes an integer as the first argument, something called a . To make it write to the , you have to set it to 1. I'll talk about it in my next post.
Did you learn something new today?
Like and share this post, and follow me for more!
Original Link: https://dev.to/omardulaimi/different-ways-to-log-messages-in-nodejs-4j9j
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To