Improve MessageFilter logging and refactor search element styles#253
Open
tonygermano wants to merge 3 commits intoOpenIntegrationEngine:mainfrom
Open
Improve MessageFilter logging and refactor search element styles#253tonygermano wants to merge 3 commits intoOpenIntegrationEngine:mainfrom
tonygermano wants to merge 3 commits intoOpenIntegrationEngine:mainfrom
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>
Contributor
|
can you add a screenshot of the new styling? |
Member
Author
gibson9583
previously approved these changes
Feb 16, 2026
Contributor
gibson9583
left a comment
There was a problem hiding this comment.
looks good again. appreciate the well documented PR
kayyagari
previously approved these changes
Feb 17, 2026
jonbartels
previously approved these changes
Feb 19, 2026
Contributor
jonbartels
left a comment
There was a problem hiding this comment.
This is a good improvement. It should be specifically called out in the release notes since someone could be doing something obscure parsing this data via an API call. I would not consider that likely.
Presenting this as a UI/UX improvement with a note that API usages may be affected would be ideal.
Added 100% test coverage for * `ContentSearchElement` * `MetaDataSearchElement` * `MessageFilterToStringStyle` * `SearchElementToStringStyle` * `ContentSearchElementToStringStyle` Signed-off-by: Tony Germano <tony@germano.name>
This commit is kept separate to show changes, but I intend for it to be squashed into the first commit of the PR before merging. This removes the special String handling I had previously added which wraps them in quotes. During a sidebar discussion I discovered that, 1. These objects are not searchable in the Events GUI. 2. These objects are stored as a property of the alert in the database as the toString value, rather than in serialized object form. In light of that, if anyone is either exporting these to another system or using the Client API to search the event details, I think it would be easier to do a text search without the quotes, and this also matches how the values were previously stored so that the searches don't need to be written with optional quotes to catch events before and after this patch. Signed-off-by: Tony Germano <tony@germano.name>
2e9d422
9ad3055 to
2e9d422
Compare
Member
Author
|
Please see the latest commit's message for details. With the changes, the output now looks like this. MessageFilter[
attachment=false,
contentSearch=[
ContentSearchElement[contentCode=1(Raw), searches=[raw 1, raw 2]],
ContentSearchElement[contentCode=5(Sent), searches=[sent 1]]
],
endDate=2026-02-02 17:16-05:00[America/New_York],
error=false,
excludedMetaDataIds=[1],
importIdLower=6,
importIdUpper=7,
includedMetaDataIds=<null>,
maxMessageId=6,
metaDataSearch=[
MetaDataSearchElement[columnName=SOURCE, ignoreCase=true, operator=CONTAINS, value=XYZ],
MetaDataSearchElement[columnName=TYPE, ignoreCase=false, operator=EQUAL, value=FOO]
],
minMessageId=5,
originalIdLower=1,
originalIdUpper=2,
sendAttemptsLower=1,
sendAttemptsUpper=5,
serverId=792e3c00-6906-4444-9642-02603403335e,
startDate=2026-02-01 08:01-05:00[America/New_York],
statuses=[SENT, QUEUED, TRANSFORMED, RECEIVED],
textSearch=M0000123,
textSearchMetaDataColumns=[SOURCE, TYPE],
textSearchRegex=<null>
] |
gibson9583
approved these changes
Mar 16, 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.

commit d19499d
commit 9ad3055