fix: migrate legacy dir.logs log4j property#275
Open
mgaffigan wants to merge 2 commits intoOpenIntegrationEngine:mainfrom
Open
fix: migrate legacy dir.logs log4j property#275mgaffigan wants to merge 2 commits intoOpenIntegrationEngine:mainfrom
mgaffigan wants to merge 2 commits intoOpenIntegrationEngine:mainfrom
Conversation
2001324 to
feb6b06
Compare
Fixes a crash on boot caused by dir.logs set in log4j2.properties, which is not supported in log4j2. Cannot use normal migration infra since log4j is initialized early in the boot processs (before classpath is fully set up). Issue: OpenIntegrationEngine#267 Signed-off-by: Mitch Gaffigan <mgaffigan@users.noreply.github.com>
bbf0117 to
71a5c24
Compare
Signed-off-by: Mitch Gaffigan <mitch.gaffigan@comcast.net>
71a5c24 to
d17ee13
Compare
jonbartels
requested changes
Mar 27, 2026
| } | ||
|
|
||
| private static boolean stripDirLogs(List<String> lines) { | ||
| return lines.removeIf(line -> isPropertyLine(line, INVALID_LOG4J_PROPERTY)); |
Contributor
There was a problem hiding this comment.
This is the meat of the change. I have some dumb questions:
- To migrate this property should it be copied to the new
property.log.dirif it is something other than the default value? f7a1b43#diff-51942c75283fcd64879e532ee86d52ac8aec09b833cd3b686855eb75b16c4185R5-L12 - Should this be using readlines? Could it instead just parse the properties file using a standard Java Properties parser?
- Remove the line, comment the line, or comment the line and add an explanatory text?
Contributor
Author
There was a problem hiding this comment.
@jonbartels, not dumb at all. Reasonable questions.
- In my understanding, the previous line was a no-op. We're also not changing the actual log dest (so any destination they set prior will be maintained). @tonygermano, can you confirm?
- I'm ambivalent re: readlines vs Java Properties parser. I think the properties parser would clear any comments and formatting, but not sure.
- Since the line had no effect, I think removing it is appropriate, but ¯\_(ツ)_/¯
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.
Fixes a crash on boot caused by dir.logs set in log4j2.properties, which is not supported in log4j2. Cannot use normal migration infra since log4j is initialized early in the boot processs (before classpath is fully set up).
Closes #267