refactor: convert log calls to parameterized logging in DDK builder/generator/UI#1307
Merged
joaodinissf merged 1 commit intoMay 18, 2026
Conversation
0cfcee8 to
43d0eaf
Compare
8ee2bf9 to
a3348d5
Compare
…enerator/UI
Replaces string concatenation, `NLS.bind`, and `MessageFormat.format` in `LOGGER.x(...)` calls with parameterized `{}` placeholders, using `Supplier`/method-refs for lazy argument evaluation. Adds `org.apache.logging.log4j.util` to OSGi manifests for the `Supplier` import, consolidating with the existing `Import-Package` directive (each affected manifest had a duplicate `Import-Package:` header that this fixes). Drops the dead `org.apache.log4j` (Log4j 1) import from `xtext.builder`'s manifest — no source references it. Modules touched: `xtext.builder`, `xtext.generator`, `xtext.ui`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
a3348d5 to
1d43e47
Compare
rubenporras
reviewed
May 18, 2026
| LOGGER.debug("Starting " + type.name() + " build:" + "\ndeleted(" + toBeBuilt.getToBeDeleted().size() + ")=" + toBeBuilt.getToBeDeleted().toString() | ||
| + "\nupdated(" + toBeBuilt.getToBeUpdated().size() + ")=" + toBeBuilt.getToBeUpdated().toString()); | ||
| } | ||
| LOGGER.debug("Starting {} build:\ndeleted({})={}\nupdated({})={}", type::name, // NOPMD GuardLogStatement - all args are Suppliers |
Member
There was a problem hiding this comment.
this is not quite correct, we are calling getters here, however, I do not think it matters much in this case because these getters do not do object allocation.
Collaborator
Author
There was a problem hiding this comment.
Good catch, that's right. Going ahead since these are lightweight.
rubenporras
approved these changes
May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces string concatenation,
NLS.bind, andMessageFormat.formatinLOGGER.x(...)calls with parameterized{}placeholders, usingSupplier/method-refs for lazy argument evaluation. Addsorg.apache.logging.log4j.utilto OSGi manifests for theSupplierimport, consolidating with the existingImport-Packagedirective (each affected manifest had a duplicateImport-Package:header that this fixes). Drops the deadorg.apache.log4j(Log4j 1) import fromxtext.builder's manifest — no source references it. Modules touched:xtext.builder,xtext.generator,xtext.ui.🤖 Generated with Claude Code