diff --git a/hslog/filter.py b/hslog/filter.py index a35bb48..78df9e1 100644 --- a/hslog/filter.py +++ b/hslog/filter.py @@ -8,7 +8,7 @@ from hslog.utils import parse_tag -# List of TAG_CHANGE tags to discard +# List of TAG_CHANGE tags to discard/keep BLACKLISTED_TAGS = [ "EXHAUSTED", @@ -20,6 +20,10 @@ "TECH_LEVEL", ] +WHITELISTED_TAGS = [ + "COPIED_FROM_ENTITY_ID", +] + # List of FULL_ENTITY tags to discard BLACKLISTED_FULL_ENTITY_TAGS = [ @@ -403,7 +407,8 @@ def _handle_tag_change(self, msg: str, line: str): tag in BLACKLISTED_TAGS or ( self._current_buffer is not None and - hasattr(self._current_buffer, "skip_tag_changes") + hasattr(self._current_buffer, "skip_tag_changes") and + tag not in WHITELISTED_TAGS ) ): self._start_new_buffer("TAG_CHANGE", "")