Mastering Logging in Java
summary
Comparisons show java.util.logging, Log4j, SLF4J and Logback in use, with Log4j requiring Log4j >= 2.17.2 after four 2021 CVEs; SLF4J provides an API facade, Logback implements that API. Practical recipes cover class-named loggers, lazy lambdas, async writers, rolling files (1 MB for tests, 10–50 MB or 2 GB in examples), and format/layout choices. Distributed setups use ELK (Elasticsearch, Logstash, Kibana), Splunk or Loki. Tracing uses micrometer tracing adds trace IDs (plus actuator) to correlate multi‑service logs.
AI-written summary · about
chapters (10)
- 0:00Introduction to logging
- 1:06Why use logging frameworks
- 11:21Java util logging overview
- 15:30Log4j framework deep dive
- 22:37SLF4J and Logback explained
- 26:50Log4j3 preview and updates
- 31:01Distributed logging platforms
- 36:20Micrometer tracing integration
- 40:41AI for log analysis
- 45:15Q&A session
related talks
53mSystem.out.println("USE A LOGGER")
37mIntegrating SLF4J and the new OSGi LogService 1.4
51mLog4Shell Armageddon or Opportunity
34mOpenTelemetry for Logging
37mHow I learned to stop being afraid and love the JVM
41mJava Made (Somewhat) Simple
46mImplementing Observability in Java-Based Projects
42mSpring Boot Unwrapped: Exploring the Latest Features
