Preparing your design workspace

Loading the problem and your saved attempt…

Design and Implement a Streaming Log Handler

Design an ordered handler pipeline that prints each supported level-tagged log event exactly once and rejects unsupported levels explicitly.

Design and implement class structure and code for a stream of INFO, DEBUG, ERROR, and MESSAGE logs. The reported expected approach is Chain of Responsibility.

For this exercise, assume one process submits immutable events containing a level and message to an ordered handler pipeline. A handler prints events for its configured level and forwards nonmatching events; each supported event is printed exactly once by the first matching handler.

The pipeline is configured before events arrive and processes them synchronously in input order. An event whose level has no configured handler returns an explicit unsupported-level result and is not printed.

Console output is sufficient; persistence, file rotation, remote aggregation, asynchronous delivery, formatting templates, and distributed logging are outside scope.

Show the requirements, object model, interfaces, and interactions, then implement a focused executable core. The design should make it possible to add a new level-specific handler by composition rather than by adding another conditional branch to a central dispatcher.