-
Notifications
You must be signed in to change notification settings - Fork 605
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
Improving logging for KeyExchanger #458
Conversation
@Andremoniy Do you have any idea how many entries a typical |
Fair enough. However the error itself says about some critical situation which has to be investigated. Say we have this issue on a bamboo server, so we loose the actual docker container's contents but want to check what's going on based on the logs. Would you approve a compromise solution with log.debug(...) printing out the contents of the hostVerifier's list? |
P.S. I don't really think that a list of 96 default object identifiers is somehow better than their actual contents :p |
Codecov Report
@@ Coverage Diff @@
## master #458 +/- ##
============================================
+ Coverage 55.55% 55.59% +0.03%
- Complexity 1210 1212 +2
============================================
Files 192 192
Lines 7850 7852 +2
Branches 712 712
============================================
+ Hits 4361 4365 +4
+ Misses 3139 3137 -2
Partials 350 350
Continue to review full report at Codecov.
|
You'd now only get a single OID ;) ( I agree that a |
Having a meaningful Following your proposal I've updated my pull request. What do you think about that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One line in there that doesn't belong to the PR I think. Otherwise great! If you remove that line then I'll merge it
In the
KeyExchanger
class there is the following error logging:log.error("Disconnecting because none of the configured Host key verifiers ({}) could verify '{}' host key with fingerprint {} for {}:{}", hostVerifiers, KeyType.fromKey(key), SecurityUtils.getFingerprint(key), transport.getRemoteHost(), transport.getRemotePort());
However the
hostVerifiers
's elements do not properly override thetoString()
method.It would be nice to see actual contents of this array for debug purposes.