Skip to content

Conversation

@padamstx
Copy link
Contributor

This commit adds some debug logging in various
components, and also modifies some tests so that
it's easy to enable debug logging when running
individual sets of tests.

@padamstx padamstx self-assigned this Aug 21, 2024
@padamstx padamstx requested review from dpopp07 and pyrooka August 21, 2024 22:34
Copy link
Member

@pyrooka pyrooka left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@dpopp07 dpopp07 left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

@padamstx padamstx marked this pull request as draft September 3, 2024 16:36
@padamstx
Copy link
Contributor Author

padamstx commented Sep 3, 2024

Temporarily changed this PR to draft status while I'm working on adding the redact secrets function and simplifying the testcase changes I original made in this PR.

@padamstx padamstx force-pushed the debug-logging branch 5 times, most recently from c2a8665 to b3abb89 Compare September 3, 2024 23:09
@padamstx padamstx marked this pull request as ready for review September 3, 2024 23:09
@padamstx padamstx requested review from dpopp07 and pyrooka September 3, 2024 23:09
@padamstx
Copy link
Contributor Author

padamstx commented Sep 3, 2024

@dpopp07 @pyrooka,
I've updated the PR to include a new logging interceptor (HttpLogger) which mimics the behavior of the okhttp3 HttpLoggingInterceptor class, except that it redacts secrets within the debug messages that it logs.

I've also made it easier to enable debug logging...
The easiest way to do this while running tests is like this (in case you wanted to try it out):

cd <project-root>
mvn test -Dtest=<testclassname> -Djava.util.logging.config.file=debug-logging.properties

e.g.
mvn test -Dtest=ContainerAuthenticatorTest -Djava.util.logging.config.file=debug-logging.properties

(I added debug-logging.properties to the project in this PR).

@padamstx padamstx force-pushed the debug-logging branch 2 times, most recently from daa0ea7 to e09aee9 Compare September 4, 2024 12:00
Copy link
Contributor

@dpopp07 dpopp07 left a comment

Choose a reason for hiding this comment

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

Updates look good to me 👍

Copy link
Member

@pyrooka pyrooka left a comment

Choose a reason for hiding this comment

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

Still LGTM!

This commit adds some debug logging in various
components, and also modifies some tests so that
it's easy to enable debug logging when running
individual sets of tests.

Signed-off-by: Phil Adams <[email protected]>
@padamstx padamstx merged commit 6100e24 into main Sep 6, 2024
@padamstx padamstx deleted the debug-logging branch September 6, 2024 12:34
ibm-devx-sdk pushed a commit that referenced this pull request Sep 6, 2024
## [9.21.2](9.21.1...9.21.2) (2024-09-06)

### Bug Fixes

* **logging:** improve java core's debug logging ([#226](#226)) ([6100e24](6100e24))
@ibm-devx-sdk
Copy link
Contributor

🎉 This PR is included in version 9.21.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants