Design
Logging Framework
Design a logging framework like Log4j or SLF4J — supporting multiple log levels, configurable sinks, and formatted output.
01 - Why interviewers ask this
Nearly every engineer has used a logging library, making this a great test of whether you can design a genuinely extensible system (pluggable levels, sinks, and formats) rather than a one-off script.
02 - Where this system exists in the real world
You interact with this design every day.
Application logging libraries (Log4j, Winston, SLF4J)
Centralized log aggregation pipelines
Audit trail systems for compliance
03 - What you'll master
Solve this once. Know it forever.
Design pluggable log levels and output destinations
Apply Singleton and Strategy patterns together
Keep the logging API simple while staying extensible
04 - What you'll design
7 functional · 3 non-functional requirements.
Log at levels: DEBUG, INFO, WARN, ERROR, FATAL
6 more requirements inside
Sign in to unlock the full brief and start designing
05 - Companies that ask this
You may face this exact question in your next interview.
Ready?
Open the canvas.
Design it yourself.
See all requirements, use staged hints, run your code, and compare with community discussions - all on the same canvas.
Start Solving