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

ct: Introduce replace mode to cth_log_redirect #7891

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

jchristgit
Copy link
Contributor

In addition to the existing way of logging to both the CT HTML logs and console, allow users to completely replace the standard logging handler with the log redirect hook, effectively silencing console logging output during Common Test runs.

Mostly taken from #7375, with the caveat that "add" mode continues being the default, and no changes outside of the hook take place.

Additionally, group cth_log_redirect test cases together to allow for easier module verification.

As suggested in #7375 (comment)

Copy link
Contributor

github-actions bot commented Nov 20, 2023

CT Test Results

    2 files    58 suites   1h 24m 27s ⏱️
450 tests 438 ✔️ 12 💤 0
485 runs  470 ✔️ 15 💤 0

Results for commit 7e6dc24.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@u3s u3s self-assigned this Nov 20, 2023
@u3s u3s added team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI priority:low labels Nov 20, 2023
Copy link
Contributor

@u3s u3s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Please apply doc related comments.

lib/common_test/doc/src/ct_hooks_chapter.xml Outdated Show resolved Hide resolved
lib/common_test/doc/src/ct_hooks_chapter.xml Show resolved Hide resolved
</item>
<tag><c>{mode, add}</c></tag>
<item>
<p>Add the logging handler instead of replacing the default logging
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please skip part "instead of replacing the default logging" - I think this would simplify the description.
maybe 2 first sentences could be combined into one ...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the first two sentences to "Add cth_log_redirect to the default logging handler: Logs will be emitted to both standard output via the default handler, and into the Common Test HTML logs.". What do you think?

In addition to the existing way of logging to both the CT HTML logs and
console, allow users to completely replace the standard logging handler
with the log redirect hook, effectively silencing console logging
output during Common Test runs.

Mostly taken from erlang#7375, with the caveat that "add" mode continues being
the default, and no changes outside of the hook take place.

Additionally, group cth_log_redirect test cases together to allow for
easier module verification.
@jchristgit jchristgit force-pushed the cth-log-redirect-mode-option branch from 1af9a06 to 7e6dc24 Compare November 22, 2023 16:07
@u3s u3s added testing currently being tested, tag is used by OTP internal CI and removed testing currently being tested, tag is used by OTP internal CI labels Nov 22, 2023
@u3s u3s merged commit 10c0d35 into erlang:master Nov 28, 2023
15 checks passed
@jchristgit jchristgit deleted the cth-log-redirect-mode-option branch November 30, 2023 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:low team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants