No matter if you are developing a small library, a complex framework or an application for end users - you will come to the point that you want to log information. The Java community offers a whole wealth of solutions: Besides java.util.logging there are libraries like tinylog, Log4J or Logback. Where are the differences and unique selling points of these frameworks? In addition, actually everyone says that only the use of a facade like slf4J is “best practice”. But why should I use an abstraction when developing a concrete application? Or does a facade perhaps offer completely different advantages? And as if that weren’t enough questions, with Java 9 a new logger, System.Logger, was quietly integrated into the OpenJDK. This talk gives an understandable guide through the logging jungle and shows a few practices that help to get the logging of libraries and applications under control. If you’re on the verge of going back to System.out out of frustration, this session is for you.
System.out.println("USE A LOGGER!!!");
by Hendrik Ebbers and Stephan Classen at JavaLand 2021, JCON 2021
Hendrik Ebbers is a co-founder of Karakun AG and lives in Dortmund, Germany. He is the founder and leader of the Java User Group Dortmund and gives talks and presentations in user groups and conferences. His JavaFX book "Mastering JavaFX 8 Controls" was released 2014 by Oracle press. Hendrik is JavaOne Rockstar, JSR expert group member and Java Champion.
Stephan Classen is a co-founder of Karakun and lives in Graubünden. He has more than ten years of experience as a fullstack software developer and a passion for clean and maintainable code.