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

Logging improvments. #74

Merged
merged 2 commits into from
Jul 28, 2017
Merged

Conversation

pjdarton
Copy link
Member

vSphereCloud's Log methods now log exceptions with Level.SEVERE instead of Level.INFO. Non-exception logging is still Level.INFO.
vSphereCloudProvisionedSlave and vSphereCloudSlave's _terminate methods had some code paths that could fail silently - they now log something.

vSphereCloud's Log methods now log exceptions with Level.SEVERE instead of
Level.INFO.  Non-exception logging is still Level.INFO.
vSphereCloudProvisionedSlave and vSphereCloudSlave's _terminate methods had
some code paths that could fail silently - they now log something.
final vSphereCloudLauncher launcher = (vSphereCloudLauncher) getLauncher();
if (launcher != null) {
final vSphereCloud cloud = launcher.findOurVsInstance();
if (cloud != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason this cloud != null check was removed? Is an NPE possible here?

Copy link
Member Author

Choose a reason for hiding this comment

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

findOurVsInstance() will throw an exception - it won't return null.

Copy link
Member Author

Choose a reason for hiding this comment

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

I managed to miss off the extra Javadoc I'd added to make this clear from my PR.
I've added another commit that adds this.
(my local code had this javadoc already, but I'm in the process of un-picking my changes into a series of discrete PRs, and this comment got missed out. Sorry for the confusion)

Copy link
Contributor

Choose a reason for hiding this comment

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

np. thanks!

Make it obvious that this method does not return null.
@pjdarton pjdarton merged commit 10270a9 into jenkinsci:master Jul 28, 2017
@pjdarton pjdarton deleted the improved_logging branch July 28, 2017 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants