-
Notifications
You must be signed in to change notification settings - Fork 4
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
Added trivial test for every basic variant of execution #18
Conversation
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
Signed-off-by: David Matějček <[email protected]>
src/test/java/org/glassfish/main/distributions/docker/AsadminIT.java
Outdated
Show resolved
Hide resolved
Signed-off-by: David Matějček <[email protected]>
<dependencies> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-jdk14</artifactId> |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not, take a look to SLF4J website. It is the artifact name just to keep continuity. JUL was added to JDK at the time of Java 1.4, since then it has nearly the same api, but internally it changed over time. And it is also a default backend behind System Logger facade, which came in Java 11.
SLF4J can bind to both as an api or as an implementation. With all those platforms you basically have to choose your backend and sink all other to it. SLF4J is very capable in this discipline, so it this case:
- TestContainers use slf4j-api
- GlassFish uses JUL as the impl backend extended by own logmanager.
- GlassFish and its dependencies use JUL, System. Logger and JBoss-Logging + some additonal custom apis as an api facade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, this is the JUL implementation binding; I have avoided using JUL and was not familiar with that artifact. Your explanation makes sense. In the context of most elements of the stack using it, it makes sense to make it the target. I've avoided it due to it being the only implementation with a performance penalty for bridging away from it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The penalty is only when an app logs using JUL and you want to translate that to slf4j and then log with something else, e.g. log4j. It’s the opposite case here. In this case, test containers use slf4j for logging and we want that to be logged via JUL, in the same way as our logs in tests. This doesn’t incur much performance penalty because JUL is called only when log messages are really logged and not always, as in the first case. Note that the slf4j-jdk14 artfact means slf4j logged via JUL, while jul-to-slf4j means JUL logged via slf4j and subsequently via some slf4j adapter (log4j, logback, etc)
No description provided.