Skip to Content
Java Projects - Second Edition
book

Java Projects - Second Edition

by Peter Verhas
August 2018
Intermediate to advanced
524 pages
14h 45m
English
Packt Publishing
Content preview from Java Projects - Second Edition

Java logging

Java since version 9 includes a façade implementation for logging. Its application is very simple and we can expect that logging frameworks will very soon start to support this façade. The fact that this façade is built into the JDK has two major advantages:

  • The libraries that want to log no longer need to have any dependency on any logging framework or logging façade. The only dependency is the JDK log façade that is there anyway.
  • The JDK libraries that log themselves use this façade and thus, they will log into the same log file as the application.

If we use the logging façade provided with JDK, the start of the ColorManager class will be changed to the following:

package packt.java11.mastermind; import javax.inject.Inject; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java 11 Cookbook - Second Edition

Java 11 Cookbook - Second Edition

Nick Samoylov, Mohamed Sanaulla

Publisher Resources

ISBN: 9781789131895Supplemental Content