Skip to content
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

Logging with Panache: better failure condition #38528

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Feb 1, 2024

When the Log API is used inside a Quarkus application, as indicated by presence of Application.currentApplication(), all Log call sites should be rewritten and hence direct calls to Log methods should always fail. Outside of Quarkus, direct calls to Log are allowed in tests, as indicated by presence of the JUnit Assertions class.

Follows up on #33210 / #33700.

When the `Log` API is used inside a Quarkus application, as indicated
by presence of `Application.currentApplication()`, all `Log` call sites
should be rewritten and hence direct calls to `Log` methods should
always fail. Outside of Quarkus, direct calls to `Log` are allowed
in tests, as indicated by presence of the JUnit `Assertions` class.
@FroMage
Copy link
Member

FroMage commented Feb 1, 2024

I don't know… wouldn't that be true for Quarkus extension runtime code, even though they're not transformed?

Copy link

quarkus-bot bot commented Feb 1, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit ca41f2d.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

Copy link
Member

@FroMage FroMage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gastaldi gastaldi merged commit ddcb144 into quarkusio:main Feb 2, 2024
50 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.9 - main milestone Feb 2, 2024
@Ladicek Ladicek deleted the logging-with-panache-better-failure-condition branch February 5, 2024 08:05
@gsmet
Copy link
Member

gsmet commented Feb 6, 2024

@Ladicek is it something we want in 3.7/3.8? If so, it needs the triage/backport label.

@Ladicek
Copy link
Contributor Author

Ladicek commented Feb 6, 2024

I treat this as a quality of life improvement and not necessarily a bug fix, so I don't feel like a backport is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants