A logger is a Log4j component or object that accepts application messages at chosen severity levels. Create one with LogManager.getLogger(), then write messages with methods such as info() and debug(). section 4.2.2
Logging becomes useful during investigation when severity controls how much execution detail appears. An info-level logger records operational events, while debug enables fine-grained observations when needed. section 4.2.2
Treat the logger as one part of a configurable logging pipeline:
- Selects which messages qualify, such as all application messages or messages from a specific application part. section 4.2.2
Tracing digit extraction
A StringDigitExtractor logger records the start and result at info level, then records each parsed character at debug level. With a Root level of info, only the start and result appear; changing the Root level to debug exposes the character-by-character trace.




