Back to All 30 System Design Questions
LLDMediumQuestion 23 of 30
Design a Pluggable Logging & Telemetry Framework (Log4j-style)
Design and implement a high-performance, non-blocking logging framework supporting hierarchical log levels, pluggable formatters, asynchronous ring-buffer appenders, and zero-allocation string formatting.
Asked by:OracleMicrosoftAmazonCisco
#Low Level Design#Design Patterns#Asynchronous I/O#Chain of Responsibility#Ring Buffer
Object-Oriented Class Hierarchy
Compiling architecture diagram...
Pluggable Logging Pipeline
Combines the Strategy pattern (Formatters) with the Observer pattern (Appenders), uses non-blocking asynchronous queue buffers to decouple calling application threads from disk I/O, and enforces lazy supplier lambdas to eliminate string allocation overhead on disabled log levels.