Logging (SLF4J & Log4j2)
Production logging for Java and Spring Boot: SLF4J vs Logback vs Log4j2, log levels, log4j2.xml, rolling files and retention, PatternLayout, MDC request IDs, async and JSON logging, Actuator level changes and Log4Shell.
Introduction to Logging
Why professional applications log instead of using System.out.println, the evolution from JUL to SLF4J and Log4j2, loggers, appenders and layouts, the log levels and when to use each, and parameterized logging.
Log4j2 Architecture & Configuration
How Log4j2 improves on Log4j 1.x, loggers, LoggerConfig and the logger hierarchy, log4j2.xml, console, file and rolling-file appenders, retention, PatternLayout symbols, additivity and multiple appenders.
Logging in Spring Boot & Production
Spring Boot's default Logback setup, switching to Log4j2 correctly, logging properties and per-package levels, profiles, MDC request IDs, async and structured JSON logs, changing levels at runtime with Actuator, Log4Shell, and production best practices.