Skip to content

Quarkus logging#2171

Merged
lampajr merged 1 commit into
Hyperfoil:masterfrom
barreiro:log
Apr 1, 2025
Merged

Quarkus logging#2171
lampajr merged 1 commit into
Hyperfoil:masterfrom
barreiro:log

Conversation

@barreiro
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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)

@lampajr
Copy link
Copy Markdown
Member

lampajr commented Mar 18, 2025

I would like to get this included in the next version, @barreiro can you give it a look and resolve the existing conflicts?

@barreiro
Copy link
Copy Markdown
Collaborator Author

barreiro commented Apr 1, 2025

@lampajr rebased

@lampajr lampajr merged commit 895dea1 into Hyperfoil:master Apr 1, 2025
2 checks passed
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