-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CLOUDSTACK-10357 Improve log messages that do not match with their method function #2580
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,7 +64,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE | |
| SuccessResponse response = new SuccessResponse(getCommandName()); | ||
| setResponseObject(response); | ||
| } catch (Exception e) { | ||
| s_logger.warn(String.format("unable to add baremetal RCT[%s]", getId()), e); | ||
| s_logger.warn(String.format("unable to delete baremetal RCT[%s]", getId()), e); | ||
| throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The same thing here regarding the passing of exception to the new one that is thrown.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I'll do one more commit |
||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1309,10 +1309,10 @@ public Answer dettachVolume(final DettachCommand cmd) { | |
|
|
||
| return new DettachAnswer(disk); | ||
| } catch (final LibvirtException e) { | ||
| s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to ", e); | ||
| s_logger.debug("Failed to dettach volume: " + vol.getPath() + ", due to ", e); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The correct spelling is |
||
| return new DettachAnswer(e.toString()); | ||
| } catch (final InternalErrorException e) { | ||
| s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to ", e); | ||
| s_logger.debug("Failed to dettach volume: " + vol.getPath() + ", due to ", e); | ||
| return new DettachAnswer(e.toString()); | ||
| } | ||
| } | ||
|
|
||
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.
What about passing the
eto theCloudRuntimeException?