-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix log content duplication in ParseJsonNativeProcessor (#1295)
This commit resolves an issue in ParseJsonNativeProcessor where the original log content was unintentionally retained in the "content" field due to improper state management. The processor incorrectly maintained a class-level state indicating whether the "content" key was overwritten during JSON parsing. While this state should be reset for each new log, it was persistently kept across logs. Consequently, if a JSON log contained a "content" key, the processor would mark the state as overwritten and not drop the "content" field in subsequent logs, leading to duplicated content. To address this, the state tracking the "content" key overwrite is moved from class level to local level, ensuring it is reset at the start of each log parsing operation.
- Loading branch information
1 parent
184c414
commit 534d7f8
Showing
3 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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