-
I'm not sure if we shouldn't go slf4j (MIT licence simple facade, I'd say "standard" in projects, which offers more flexibility and we already do have it as dependency because some dependencies already required it) instead of quite limited System.Logger, which seems to be intended more for internal use even, as per https://openjdk.org/jeps/264:
Non-Goals:
- It is not a goal to define a general-purpose interface for logging. The service interface contains only the minimal set of methods that the JDK needs for its own usage.
-
Consider using MDC (https://logback.qos.ch/manual/mdc.html; for JID, sesssion-id, connection-id)
-
In the end I think we should go with
slf4j
as it gives more flexibility and it's basically a standard. What's more, it would give us nice and easy integration with Loki via: https://loki4j.github.io/loki-logback-appender/.I started exploring OpenRewrite (https://docs.openrewrite.org/) to handle the migration though recipes to migrate away from JUL are either non-existent or utterly rudimentary.
-
-
tigase-utils
andtigase-xmltools
migrated toSystem.Logger
(instead of slf4j) as those are tiny libraries with very minimal logging thus avoiding additional dependency is convenient (and slf4j can be used as provider if present, otherwise JUL will be used as a default fallback). Remaining projects should use slf4j as it gives more flexibility and additional features.
Type |
Task
|
Priority |
Minor
|
Assignee | |
Version |
tigase-server-9.0.0
|
-
tigase-server-9.0.0 Open
In Java9 JEP 264: Platform Logging API and Service was implemented. It introduces a minimal logging API (which defaults to JUL, but makes it possible to use alternative logging solutions easier). Considering that with Tigase 8.2 we bumped minimal Java version to 11 we should update our sources to use System.Logger.
Ref: Java 9 Platform Logging API
if (Logger.isLoggable) {}
and substitution with lazily evaluated lambda calls (though, they don't accept parameter list so it would probably require string concatenation orString::formatted
…)Items: