Part 1 of 6 · 1 min read
Why this page comes third in Level 7
In this module you will
- Design a logging library from its requirements.
- Model levels, records, formatters and appenders, and say which pattern each is.
- Build a logger hierarchy where a child inherits the level and the appenders of its parent.
- Write an asynchronous appender with a bounded queue, and say what it does when the queue is full.
- Keep logging failures from breaking the application.
A logger is small enough to design in a round and rich enough to use four patterns at once. It is also a good place to apply the earlier modules: observer for outputs, strategy for formats, a chain through the logger hierarchy, and the queue and worker of Level 5, module 4. It is common practice in the field, and no book was supplied for this track. The Java code was compiled and run before it was written here. Numbers marked "made up" only show the idea.