You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the only way to display some logging is by setting an environment variable. It would be good to have the logs of interactions with the mock server written in a file.
💬 Narrative
When running pact tests
I want to have logs written into a file
So that I can debug locally and on CI much easier
📝 Notes
PactSwiftMockServer exposes a pactffi method that tells pactffi_mock_server to write the log buffer into a file.
🏗 Design
Exposes the interface ie MockService.init(log: URL? = nil)
Passes do write the log signal to PactSwiftMockServer package and into pactffi.
Uses the same base default directory for contract if no override provided (eg: /tmp/pacts/logs)
✅ Acceptance Criteria
GIVEN a valid URL to a log file is provided at MockService.init WHEN pact tests finish THEN a log file is generated at provided URL
GIVENMockService is instantiated without an URL to a log file WHEN pact tests finish THEN a log file is generated at defaultPactsDir/logs
🚫 Out of Scope
The text was updated successfully, but these errors were encountered:
🗣 Context
Currently the only way to display some logging is by setting an environment variable. It would be good to have the logs of interactions with the mock server written in a file.
💬 Narrative
When running pact tests
I want to have logs written into a file
So that I can debug locally and on CI much easier
📝 Notes
PactSwiftMockServer
exposes apactffi
method that tellspactffi_mock_server
to write the log buffer into a file.🏗 Design
MockService.init(log: URL? = nil)
PactSwiftMockServer
package and intopactffi
./tmp/pacts/logs
)✅ Acceptance Criteria
GIVEN a valid
URL
to a log file is provided atMockService.init
WHEN pact tests finish
THEN a log file is generated at provided
URL
GIVEN
MockService
is instantiated without an URL to a log fileWHEN pact tests finish
THEN a log file is generated at
defaultPactsDir/logs
🚫 Out of Scope
The text was updated successfully, but these errors were encountered: