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

Quarkus logging #2171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Quarkus logging #2171

wants to merge 1 commit into from

Conversation

barreiro
Copy link
Collaborator

@barreiro barreiro commented Nov 14, 2024

Fixes Issue

Fixes #1993

Changes proposed

  • Move from org.jboss.logging.Logger to io.quarkus.logging.Log
  • Use debugf, infof and other "format" methods
  • String concatenation + when creating Exception mesages
  • Standardize on "".formatted() instead of String.format()

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@barreiro barreiro requested a review from lampajr November 14, 2024 04:49
@barreiro barreiro self-assigned this Nov 14, 2024
Copy link
Member

@lampajr lampajr left a comment

Choose a reason for hiding this comment

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

Hi @barreiro, planning to look at this either today or tomorrow, meanwhile can you please apply the formatting as it looks like there are some uncommitted changes

Copy link
Member

@lampajr lampajr left a comment

Choose a reason for hiding this comment

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

Overall lgtm!

I've just one doubt, the quarkus doc clearly says that:

Only use the Log API in application classes, not in external dependencies. Log method calls that are not processed by Quarkus at build time will throw an exception.

But I see we are using horreum-infra-common in the Jenkins plugin that is not using Quarkus IIUC 👉🏻 https://github.com/jenkinsci/horreum-plugin/blob/bb0d263b081da6967bba3ca6e98f4d3dc9c194cd/pom.xml#L248-L253, therefore I think there could be some problem there, wdyt?

@johnaohara
Copy link
Member

Overall lgtm!

I've just one doubt, the quarkus doc clearly says that:

Only use the Log API in application classes, not in external dependencies. Log method calls that are not processed by Quarkus at build time will throw an exception.

But I see we are using horreum-infra-common in the Jenkins plugin that is not using Quarkus IIUC 👉🏻 https://github.com/jenkinsci/horreum-plugin/blob/bb0d263b081da6967bba3ca6e98f4d3dc9c194cd/pom.xml#L248-L253, therefore I think there could be some problem there, wdyt?

good catch.
Anything in 'horreum-api', 'horreum-client' or 'horreum-infra-common' can not use Quarkus loggging

Copy link
Member

@lampajr lampajr left a comment

Choose a reason for hiding this comment

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

lgtm

@lampajr
Copy link
Member

lampajr commented Dec 6, 2024

I was thinking whether we want to backport this or not, if we won't.. it means that most of the next PRs that need to be backported will likely have some conflicts.. therefore I see two options:

  1. Merge it and backport it as well (it should not be a problem as we are just touching loggings)
  2. Merge this one as close as possible to the next 0.17 release

wdyt @johnaohara @barreiro ?

@barreiro
Copy link
Collaborator Author

barreiro commented Dec 6, 2024

I'm fine either way. I guess it will depend on how long it will take until a 0.17 release and how much will we have to backport until then.

@lampajr
Copy link
Member

lampajr commented Dec 11, 2024

I guess it will depend on how long it will take until a 0.17 release and how much will we have to backport until then.

yeah exactly!

I would like to get #2202 merged and backported and then I think we can merge this one as well (IMO I would also backport it even if we won't release it in the 0.16 stream)

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

Successfully merging this pull request may close these issues.

Use simplified Quarkus logging instance
3 participants