Le 2024-03-04 à 00 h 31, Pavel Horal a écrit :
isn't System.Logger mainly for JDK internals? I always thought that
using it is in a similar ballpark as using java.util.Optional in
method arguments (i.e. „please don’t“).
System.Logger was needed by JDK internal, e.g. because of bootstrapping
issues. Another reason is that java.logging is a separated JPMS module,
so the java.base module cannot depend on it. However, there is nothing
in System.Logger, System.getLogger() or System.LoggerFinder javadoc
saying that we should not use it. If it was the case, I think that
Oracle would not have placed those interfaces in public API, and
certainly not in the java.lang package which is implicitly imported by
everyone.
System.Logger can be used by applications that want to keep the
java.logging module optional. It is also a good fit for applications,
like Maven, which need more than println but not as much as a real
logging framework.
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org