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

RFC: Update debugging docs at https://docs.pact.io/help/enabling-debug-logging #524

Open
mefellows opened this issue Oct 9, 2024 · 3 comments
Labels
documentation Indicates a need for improvements or additions to documentation good first issue Indicates a good issue for first-time contributors help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@mefellows
Copy link
Member

Previous issues
n/a

Is your feature request related to a problem? Please describe.
Documentation

Describe the solution you'd like
Update the documentation at https://docs.pact.io/help/enabling-debug-logging for Pact .NET to help users understand how to set the appropriate log level, and where to retrieve the output.

Breaking Changes
n/a

Potential Downsides/Caveats
n/a

Describe alternatives you've considered
n/a

Additional context
When people raise requests for issues, particularly in our community Slack workspace, it's helpful to point users at simple location applicable to all client SDKs where they can understand how to produce relevant DEBUG logs for assistance.

@mefellows mefellows added the triage This issue is yet to be triaged by a maintainer label Oct 9, 2024
@adamrodger adamrodger added help wanted Indicates that a maintainer wants help on an issue or pull request good first issue Indicates a good issue for first-time contributors documentation Indicates a need for improvements or additions to documentation and removed triage This issue is yet to be triaged by a maintainer labels Oct 10, 2024
@adamrodger
Copy link
Contributor

Yeah cool 👍 It's already listed in the Readme so should be easy to centralise.

@mefellows
Copy link
Member Author

Thanks Adam. In case it helps, the gaps that seem to come up consistently in slack questions:

  1. How to enable logging (this seems straightforward enough, consumer example and provider one (the readme shows the provider only I think)
  2. How to get access to the logs themselves

Number (2) is where I struggle to provide useful advice. I tend to run tests/code from my terminal, wherstdout and stderr is usually captured. But I think when running with IDEs and/or test framework (nunit/xunit) the logs seem to be harder to locate for some.

Is the concept of an Outputter a common one in .NET? I recall this confusing some, but admittedly this was a while back so I might be extrapolating too far.

@adamrodger
Copy link
Contributor

Ah yeah the logs output literally in the IDE output window of the test. On .Net, the tests run in parallel so they don't write directly to stdout as they go otherwise they'd all interleave.

Instead each test captures the output separately and reports to the output window for that test. Probably people just need to scroll down a little bit more, because the pact logs are appended after any output from the test itself.

I keep my test window on a vertical split so I get the full output for each test (which I think is the default) but if anyone has it in a horizontal split perhaps they go off the bottom of the screen and require scrolling down.

In CI or console they all end up on stdout though, they're just written a test at a time so they don't interleave.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Indicates a need for improvements or additions to documentation good first issue Indicates a good issue for first-time contributors help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants