Skip to content

Logger Framework — Simple#

Problem statement (interviewer prompt)

Design a logging framework (Log4j / SLF4J-style): named loggers per class, levels (TRACE → ERROR), pluggable appenders (console, file, syslog, kafka), formatters (text / JSON), async logging without blocking the caller, and thread-safety. Cover the class hierarchy + factory pattern.

classDiagram
  class Logger
  class Appender
  class Formatter
  class Filter
  class Level
  Logger --> Appender
  Logger --> Formatter
  Logger --> Filter
  Logger --> Level