-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary This change primarily focuses on adding a new feature to the `Logger` class in `src/task/src/utilities/logger.ts` to filter control strings from the log messages. The changes also include updates to the corresponding tests in `src/task/tests/utilities/logger.spec.ts` to validate the new functionality. Here are the key changes: **Logger Class Enhancements:** * [`src/task/src/utilities/logger.ts`](diffhunk://#diff-5edc22bc177458bb92a473da7eb8dd56e9cdd5091f222c90830e9e7de380030cR33): Added a new method `filterMessage` to the `Logger` class. This method removes control strings from the log messages to prevent them from being printed to `stdout`. This filtering is now applied in the `logDebug`, `logInfo`, `logWarning`, and `logError` methods. [[1]](diffhunk://#diff-5edc22bc177458bb92a473da7eb8dd56e9cdd5091f222c90830e9e7de380030cR33) [[2]](diffhunk://#diff-5edc22bc177458bb92a473da7eb8dd56e9cdd5091f222c90830e9e7de380030cR43) [[3]](diffhunk://#diff-5edc22bc177458bb92a473da7eb8dd56e9cdd5091f222c90830e9e7de380030cR53) [[4]](diffhunk://#diff-5edc22bc177458bb92a473da7eb8dd56e9cdd5091f222c90830e9e7de380030cR63) [[5]](diffhunk://#diff-5edc22bc177458bb92a473da7eb8dd56e9cdd5091f222c90830e9e7de380030cR88-R96) **Test Updates:** * [`src/task/tests/utilities/logger.spec.ts`](diffhunk://#diff-4deade9fa59bc7d857956add0b8fac29f34b9173c24fee51f440b4ee19336d3fR21-R37): Added new test cases for each of the logging methods (`logDebug`, `logInfo`, `logWarning`, `logError`, `logErrorObject`, and `replay`) to validate that control strings are correctly filtered out from the log messages. [[1]](diffhunk://#diff-4deade9fa59bc7d857956add0b8fac29f34b9173c24fee51f440b4ee19336d3fR21-R37) [[2]](diffhunk://#diff-4deade9fa59bc7d857956add0b8fac29f34b9173c24fee51f440b4ee19336d3fR51-R67) [[3]](diffhunk://#diff-4deade9fa59bc7d857956add0b8fac29f34b9173c24fee51f440b4ee19336d3fR81-R97) [[4]](diffhunk://#diff-4deade9fa59bc7d857956add0b8fac29f34b9173c24fee51f440b4ee19336d3fR111-R127) [[5]](diffhunk://#diff-4deade9fa59bc7d857956add0b8fac29f34b9173c24fee51f440b4ee19336d3fR141-R162) [[6]](diffhunk://#diff-4deade9fa59bc7d857956add0b8fac29f34b9173c24fee51f440b4ee19336d3fR197-R236) ## Testing ### Test Types - [X] Unit tests - [X] Manual tests ### Unit Test Coverage 100% --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
addd60a
commit 9bb8463
Showing
3 changed files
with
144 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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