

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
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
Logs are a great tool. But it's possible, even easy, to overdo it. There's nothing worse than trying to debug a problem, only to be overwhelmed by a torrent of useless log messages.
I once worked at a company that spent almost as much on their third-party logging service as they did on their cloud provider. They just logged way more than they needed.
I recommend a minimal logging strategy.
Don't log the same event more than once
Don't log anything you don't care about
Don't log events that may resolve automatically (e.g. the first failure of a retry loop)
Log at the appropriate severity level
Use structured logging to enable better filtering and searching
Include timestamps for better event correlation