

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: Best Practices
incomplete
2: Timestamps
incomplete
3: Minimal Logging
incomplete
4: Redundant Logs
incomplete
5: One Log Per Event
incomplete
This lesson's interactive features are locked, please to keep using them
Logging is often taken for granted. We all want useful logs when something goes wrong, but while writing new code, it's easy to forget about logging.
Let's be better.
Click to play video
Logs serve different purposes depending on who is reading them.
Think about the last time you looked at logs for a program you didn't write. How did you approach them differently from logs for a program you did write?
It's always easier to understand logs for a program you wrote, because you have full context. Good logging practices ensure that others can understand your logs too. Examples include:
In this course, we'll focus on creating good logs for developers and operators – the most common readers in backend applications.
Developers and operators typically read logs when something goes wrong. They want to understand what happened and why it happened. As such, valuable logs tend to be: