Repository navigation
Conversation
The Pact library buffers every plugin log entry for the lifetime of the process, keyed by plugin instance. Add pact.plugins with `get_logs`, which returns them as `PluginLogEntry` objects. Forwarding through `logging` already delivers each entry with its instance ID, test run ID and target. A buffered entry adds the plugin name, the time the library recorded it and its source: a line on the plugin's stderr, or a structured record sent over the plugin protocol. `get_logs` also reaches entries recorded before the caller attached a handler. The instance ID is only reported on the forwarded records, so `get_logs` is used together with them. A fake plugin under PACT_PLUGIN_DIR covers that path end to end. Signed-off-by: JP-Ellis <josh@jpellis.me> Assisted-by: Claude Code:claude-opus-5-5
JP-Ellis
added this pull request to stack #1733
October 16, 2026 00:37
2 of 3 tasks
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
Adds
pact.plugins.get_logs, which returns the log entries the FFI buffers for a plugin instance asPluginLogEntryobjects. Each entry carries the plugin name, timestamp and source, in addition to the fields on the forwardedpact.pluginsrecords.Stacked on #1731.
🔥 Motivation
Forwarding already delivers every plugin entry through
logging. Buffered access suits code which inspects a plugin's output after the fact, such as a test asserting on what a plugin logged. The plugin instance ID comes from theplugin_instance_idattribute of a forwarded record.🔨 Test Plan
🔗 Related issues/PRs