Interview practice question
Debug logging slows the service
Backend Engineering · Language Runtimes · Intermediate
Your service becomes much slower when debug logging is enabled, and even with it disabled, profiling shows time spent building log messages. Why?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Message built before level check.
- String concatenation/serialisation cost.
- Use parameterised logging / lazy suppliers.
- Guard expensive logs with level checks.
- Async appenders; avoid logging huge objects.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.