Logging records events while a program runs. Severity controls which events a handler receives, and a formatter decides which record fields appear in the output. A request id belongs in context when every event for the same operation needs to be traced. Exception events should describe the failure without hiding it behind an unrelated generic message.
These exercises capture a dedicated logger in memory. They don't modify the root logger, depend on a clock, or write real log files. You will attach a handler, perform the operation, and remove the handler in finally so later work doesn't inherit duplicate output. Keep repeated events when they describe separate actions. The checks distinguish duplicate handlers from duplicate message text and include blank fields and rejected numeric strings.