Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XS✔ ◾ Message Filtering #510

Merged
merged 5 commits into from
Jun 7, 2024
Merged

Conversation

muiriswoulfe
Copy link
Member

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: 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] [2] [3] [4] [5]

Test Updates:

Testing

Test Types

  • Unit tests
  • Manual tests

Unit Test Coverage

100%

@muiriswoulfe muiriswoulfe added the enhancement New feature or request label Jun 6, 2024
@muiriswoulfe muiriswoulfe self-assigned this Jun 6, 2024
@muiriswoulfe muiriswoulfe requested a review from a team as a code owner June 6, 2024 15:01
Copy link
Contributor

github-actions bot commented Jun 6, 2024

PR Metrics

Thanks for keeping your pull request small.
Thanks for adding tests.

Lines
Product Code 14
Test Code 130
Subtotal 144
Ignored Code -
Total 144

Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs!

@github-actions github-actions bot changed the title Message Filtering XS✔ ◾ Message Filtering Jun 6, 2024
@microsoft microsoft deleted a comment from github-actions bot Jun 6, 2024
@microsoft microsoft deleted a comment from github-actions bot Jun 7, 2024
@muiriswoulfe muiriswoulfe enabled auto-merge (squash) June 7, 2024 09:30
@muiriswoulfe muiriswoulfe requested a review from K-Cully June 7, 2024 09:31
@muiriswoulfe muiriswoulfe enabled auto-merge (squash) June 7, 2024 14:45
@muiriswoulfe muiriswoulfe merged commit 9bb8463 into main Jun 7, 2024
26 checks passed
@muiriswoulfe muiriswoulfe deleted the muiriswoulfe/message-filtering branch June 7, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants