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

Clarify debugging examples with more comments #2330

Merged
merged 4 commits into from
Aug 24, 2022

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

Users unintentionally copy HTTP/2 configuration when they should debug
only HTTP/1.1 and still ask questions why trace logs are not visible.

Modifications:

  • Clarify 2nd and 3rd argument of enableWireLogging and
    enableFrameLogging;
  • Clarify that HttpProtocolConfigs.h2() is required only for HTTP/2;
  • Clarify how to enableFrameLogging in case of ALPN;

Result:

More comments for debugging examples.

Motivation:

Users unintentionally copy HTTP/2 configuration when they should debug
only HTTP/1.1 and still ask questions why trace logs are not visible.

Modifications:
- Clarify 2nd and 3rd argument of `enableWireLogging` and
`enableFrameLogging`;
- Clarify that `HttpProtocolConfigs.h2()` is required only for HTTP/2;
- Clarify how to `enableFrameLogging` in case of ALPN;

Result:

More comments for debugging examples.
@idelpivnitskiy idelpivnitskiy self-assigned this Aug 23, 2022
Copy link
Contributor

@bondolo bondolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refinements and clarifications!

servicetalk-examples/http/debugging/build.gradle Outdated Show resolved Hide resolved
@@ -28,6 +28,7 @@
<!-- Additional useful loggers of interest - include relevant loggers in your log4j2.xml file -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file needed since the example also has a dependency on test resources? Perhaps also make this change in test resources log4j.xml as well.

Copy link
Member Author

@idelpivnitskiy idelpivnitskiy Aug 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it's needed here. log4j.xml form test-resources is for tests purposes only, we don't want too much debug level logging there. In this example, it's useful to show what loggers they can enable for extra visibility.

@bondolo bondolo added the docs Improvements for documentation and examples label Aug 23, 2022
@idelpivnitskiy idelpivnitskiy merged commit 126f25d into apple:main Aug 24, 2022
@idelpivnitskiy idelpivnitskiy deleted the debug-ex branch August 24, 2022 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements for documentation and examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants