-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logging support #32
Comments
+1
Might be a good occasion to look into loading all Layrry dependencies via
their own layer instead of the boot layer, as is the case now. That way,
they won't interfere with any user deps in application layers (which seems
likely for popular logging libs).
… |
True, but wouldn't using the |
Ah yes, good point. I wouldn't use JUL then, but rather System.Logger (
https://twitter.com/gunnarmorling/status/1276880104992509953), as then you
get away with adding the java.base module.
… |
How is that API supposed to work? So far I've found examples that claim you must implement your own |
You could think of it as an slf4j-like API, coming with the JDK itself. Logger libraries should provide the required binding, e.g. here for log4j. JUL can be used if nothing else is available, I believe. And somewhat meta, slf4j also will provide a binding (enabling to use all the logger libraries it supports) at some point (pending PR courtesy to @nicolaiparlog). |
What I can understand looking at qos-ch/slf4j@4128670, a In our case we don't have a "logger" per-se. We could wrap a Is the intention to break logging support into two places:
|
AFAIK, that default binding to JUL is already part of the JDK: if no other binding exists and JUL is present (i.e. not in jlink image without the |
From JEP 264
I tried to convert a small library from slf4j to use System.logging and definitely found the System.logging API lacking. It might be useful to have a small wrapper library that has a subset of the slf4j API that solves the above issues and makes conversion of libraries easier. At a bare minimum it would be nice to have |
It would be good to turn on verbose output when Layrry is assembling the layers for example.
The text was updated successfully, but these errors were encountered: