What are logs, why should you use them, and what should you be logging?
- [Narrator] What is a log?…No, not the wood kind.…A log is a record of events and messages between systems.…They're used to understand what's happening on a system…and define problems.…Sounds like a great idea.…Let's see how our rock, paper, scissors game logs.…Open up Visual Studio Code, then the terminal.…Let's take a look at our log files.…Type PM2 space logs and press Enter.…
Well, that's underwhelming.…In fact, other than start up messages from PM2,…there aren't any logs.…Let's open up a browser and arrange the window…so we can see both.…Great, let's start a game.…Navigate to local host port 5000…and then click Start New.…Make a choice.…Awesome.…Over on the left, what's going on on our log files?…Well, nothing.…
That's not particularly useful.…Alright, let's trigger an error.…Instead of games one, let's go to games asdf.…Now what's in the log?…An error, now we're getting somewhere, or are we?…Looking at this error, can you tell me…how to make this error happen again?…Well, there's a vague error message…about may have forgotten and a really specific…
- Building a troubleshooting mindset
- Why measure performance?
- What's a microservice architecture?
- Managing microservices with PM2
- Effective logging strategies
- Debugging Node.js applications
- Benchmarking performance
- Profiling code execution
- Knowing what to optimize
Skill Level Intermediate
Node.js: Deploying Applicationswith Kirsten Hunter1h 24m Intermediate
Building RESTful Web APIs with Node.js and Expresswith Emmanuel Henri1h 40m Intermediate
1. Build a Troubleshooting Mindset
2. Introducing Microservices
3. Effective Logging Strategies
4. Debugging Node.js Applications
Debugging isn't just logging3m 51s
5. Measuring Performance
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.