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

Refactor Logs APIs and implementation #20

Merged
merged 1 commit into from
Jan 12, 2025
Merged

Refactor Logs APIs and implementation #20

merged 1 commit into from
Jan 12, 2025

Conversation

prashantv
Copy link
Owner

TestResult.Logs() now returns a list of structured entries for logs.

Most callers will likely rely on Logs.String() to get a concatenated string
of all logs, in a format similar to go test. However, tests can also get a
list of messages, or work with the Log entry directly.

The log entry includes the message, caller information, and the testing.TB
function that was used to log. In the future, we can include caller PCs if
there's use-cases, but PCs are not exposed due to the complexity of
merging caller PCs across the log caller, and possibly a cleanup caller.

@prashantv prashantv merged commit b2b7089 into main Jan 12, 2025
3 checks passed
@prashantv prashantv deleted the prashant/logs-api branch January 12, 2025 06:29
@prashantv prashantv mentioned this pull request Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant