Message Logger with a Chain of Handlers

Asked at Oracle · Coding Questions · Difficulty: Easy · Last asked Nov 10, 2026

Build a small logging component in which a message travels through an ordered list of handlers before it is finished. Each handler can look at the message, change it, record it, or stop it, and whatever it passes on is what the next handler sees.

Loading the problem…