Course Content
Data Structures & Algorithms
Full Stack Web Development
Understanding and playing with DOM (Document Object Model)
0/2
MERN project
0/2
Low Level System Design
LLD Topics
High Level System Design
Fast-Track to Full Spectrum Software Engineering
Explanation of Steps

  • Start
    The logger is invoked through a method call like logger.log("message", INFO).

 

  • Check if log level is enabled
    The logger checks if the given message level (e.g., DEBUG) is allowed based on the current configuration.

 

  • Ignore Message (if level is too low)
    If the log level is lower than the configured threshold, the logger exits without logging.

 

  • Format the Message
    If the message passes the log level filter, it is passed to a formatter that adds metadata (timestamp, level, etc.).

 

  • Pass to Handler
    The formatted message is passed to one or more handlers (e.g., file handler, console handler).

 

  • Write the Log
    The handler writes the log to the desired output destination.

 

  • End
    The logging process ends after writing.



How to Explain to Students

  • Emphasize conditional paths (e.g., level check).
  • Highlight the separation of responsibilities: formatting and handling.
  • Discuss how this flow supports extensibility and performance.
0% Complete
WhatsApp Icon

Hi Instagram Fam!
Get a FREE Cheat Sheet on System Design.

Hi LinkedIn Fam!
Get a FREE Cheat Sheet on System Design

Loved Our YouTube Videos? Get a FREE Cheat Sheet on System Design.