Module 10 · System Design · Six more low-level rounds
Design a logger (levels, handlers and the one instance)
Design a Logger · Open board
Levels and thresholds, the chain every handler sees, what a singleton costs in tests, and the queue in front of a slow disk.
Before you start. You need two lessons and three small words. A class is a blueprint for objects. A method is an action an object can do. A thread is one line of work a program runs, and a program can run several at once. Five letters, one shop (SOLID) gave the rule that a class should have one job and depend on a small front, not on a concrete part. Swap the rule, keep the class (Strategy and Factory) showed a strategy (one job, several interchangeable rules, all answering the same call) and dependency injection: handing a class its parts from outside instead of letting it build them. This lesson uses both to build a small logging library.
Lesson 48 of 73 in System Design
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year, or $19.50 for your first year with LAUNCH50, ends 1 Nov, 18:30 UTC.