-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Labels
area:documentationRelating to the documentationRelating to the documentationarea:ffiRelating to the FFIRelating to the FFIdifficulty:easyA simple task appropriate for newcomers to the codebaseA simple task appropriate for newcomers to the codebase
Milestone
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Description
Improve the documentation as to how logging can be configured for the FFI. Specifically, it should:
-
Direct users to the
pact_ffi.log_to_stderrfunction -
Advise that the FFI logging can only be initialised once, and as such, is probably best placed in a fixture within
conftest.py:import pytest import pact_ffi @pytest.fixture(autouse=True, scope="session") def pact_logging(): pact_ffi.log_to_stderr("INFO")
-
Advise that more advanced configuration can be set up (such as logging to an internal buffer and retrieving logs on demand).
Motivation
While the Python code uses the standard library logging, the underlying FFI cannot interface with that. This is why there's a need to configure logging first.
Have you tried building it?
No response
Self-service
- I'd be willing to contribute this feature to Pact Python myself.
Copilot
Metadata
Metadata
Assignees
Labels
area:documentationRelating to the documentationRelating to the documentationarea:ffiRelating to the FFIRelating to the FFIdifficulty:easyA simple task appropriate for newcomers to the codebaseA simple task appropriate for newcomers to the codebase
Type
Projects
Status
✅ Completed