Sanitize legacy dir.logs Log4j property before server startup#4
Closed
Copilot wants to merge 4 commits into
Closed
Sanitize legacy dir.logs Log4j property before server startup#4Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Refactors the ToStringStyle implementations for MessageFilter and related
search elements to significantly improve debuggability and log readability.
Key Changes:
- Refactored MetaDataSearchElementToStringStyle into a generic
SearchElementToStringStyle to eliminate code duplication.
- Added ContentSearchElementToStringStyle:
- Converts raw content codes into human-readable ContentType names
(e.g., "1(Raw)") instead of opaque integers.
- Updated MessageFilterToStringStyle:
- Replaced legacy Calendar formatting with java.time (ZonedDateTime)
and included time and timezone id.
- Added recursive indentation logic to render nested collections
in a hierarchical format.
- Applied new styles to ContentSearchElement and MetaDataSearchElement
toString() methods.
- Previously ContentSearchElement was inheriting the Object.toString
method.
This change primarily adds detail for ContentSearchElements when viewing
the MessageFilter in the server event log. The addition of the time and
timezone id fill in some missing details for the start and end times.
The additonal reformats improve readability.
Signed-off-by: Tony Germano <tony@germano.name>
Added 100% test coverage for * `ContentSearchElement` * `MetaDataSearchElement` * `MessageFilterToStringStyle` * `SearchElementToStringStyle` * `ContentSearchElementToStringStyle` Signed-off-by: Tony Germano <tony@germano.name>
Copilot
AI
changed the title
[WIP] Fix log4j2.properties invalid line causing server startup failure
Sanitize invalid Log4j charset property before server and CLI startup
Mar 26, 2026
mgaffigan
requested changes
Mar 26, 2026
Owner
mgaffigan
left a comment
There was a problem hiding this comment.
The line needing to be removed during the migration is "dir.logs = logs". I don't know if anything but server was affected. Please do not target the charset line and then review for spurious changes.
Author
Updated in 8bf73db. I reverted the charset/CLI changes, restored the original shipped config entries, and changed the server-side startup sanitization to remove the legacy |
Copilot
AI
changed the title
Sanitize invalid Log4j charset property before server and CLI startup
Sanitize legacy dir.logs Log4j property before server startup
Mar 26, 2026
0dc41ce to
2001324
Compare
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
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.
Recent Log4j updates made the long-invalid
dir.logs = logsentry fatal during configuration parsing, which can prevent the server from starting on upgraded installs. This change restores the original CLI behavior, keeps the shipped config files unchanged, and strips the bad server-side entry from existing server configs before Log4j initializes.Startup-time remediation for existing server installs
server/conf/log4j2.propertiesbefore logger initialization and remove anydir.logsassignment, regardless of surrounding whitespace.Scope correction
property.log.dirsetting.Regression coverage
dir.logsline.dir.logsis removed whileproperty.log.dirremains intact.Example of the sanitized entry:
dir.logs = logsAfter this change, server startup removes that legacy line before Log4j reads the file, allowing existing upgraded server configs to continue loading without manual edits.
⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.