-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
io.quarkus.logging.Log breaks unit tests #33210
Comments
cc @Ladicek |
It would be fairly easy to allow (The only thing I can think of is looking for |
Another option is: just stop failing, period. The The issue with this is that libraries that don't go through the Quarkus bytecode transformation would suddenly be able to use this API (they can't today), which would come with significant overhead, and it's not exactly obvious when the API has overhead and when it doesn't. So I'd prefer to not do this unconditionally. Configuration is probably a bad idea. Detecting test environment seems like a best choice to me (possibly with an undocumented system property to override), except the only way I can think of (see previous comment) is dubious. |
I would look for JUnit on the class path, and if it is present allow static usage. |
I think that |
Describe the bug
While the automatic logger is convenient it can't be used outside of @QuarkusTest (i.e. if you just want to test some logic that does not depend on any services).
This logger should detect if it is being used in a test and fall back to inefficient logging done by walking the call stack for the case where it has not had the bytecode magic applied.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: