Hi, sorry to jump into a conversation, but 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“).
Pavel On Sun, 3 Mar 2024 at 23:54, Martin Desruisseaux < martin.desruisse...@geomatys.com> wrote: > Le 2024-03-03 à 22 h 53, Romain Manni-Bucau a écrit : > > > It is expected to use System so the logger finder. if it is not the > > case you broke the contract of this API. > > > Can you point to the contract saying that? > > > > As a matter of fact it is current state so not sure what you want to > > enable. > > > For the third time: more useful log information ("real" source class and > source method) when desired, e.g. for debugging. > > > > It is the same rational than creating maven-api to not restate the 10 > > years of discussion leading to that. > > > I'm not questioning the whole Maven API, only a part that does not seem > to have any added value compared to a standard Java interface that did > not existed 10 years ago. > > > > JUL had been proposed multiple times (…snip…) but core committers > > always had been opposed to that and System.Logger has some limitations > > > Okay, so Log was the compromise between java.util.logging and println. I > understand that. But System.Logger is the same compromise and is as > suitable as Log. Its only drawback compared to Log was to not be > available before Java 9. > > > > Ok, assume we do nothing, we reached that stage sine ~10 years - ok > > the way to do it changed a bit but we didn't loose it, this is where > > you lost me. > > > I'm just proposing to replace Log by System.Logger, which provides the > exact same API in only a slightly different way. So: > > logger.info("My information"); > > Become: > > logger.log(System.Logger.Leven.INFO, "My information"); > > That's all. The benefit is the one that I repeated 3 times. Part of my > discussion in previous email was an attempt to justify that the extra > verbosity caused by having to write "System.Logger.Leven.INFO" is not > necessarily a bad thing if it creates an incentive to not invoke "log" > for every line in multi-line messages. > > Martin > >