Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,18 @@ private ContainerUtils() {
public static ContainerCommandResponseProto logAndReturnError(
Logger log, StorageContainerException ex,
ContainerCommandRequestProto request) {
String logInfo = "Operation: {} , Trace ID: {} , Message: {} , " +
"Result: {} , StorageContainerException Occurred.";
String logInfo = "Operation: {} , Trace ID: {} , Block ID: {} , " +
"Message: {} , Result: {} , StorageContainerException Occurred.";
if (ex.getResult() == CLOSED_CONTAINER_IO ||
ex.getResult() == CONTAINER_NOT_OPEN) {
if (log.isDebugEnabled()) {
log.debug(logInfo, request.getCmdType(), request.getTraceID(),
log.warn(logInfo, request.getCmdType(), request.getTraceID(),
request.getGetBlock().getBlockID(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be still logged at DEBUG level if it is under the isDebugEnabled() condition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for your comment
I commit new version that if it is under the condition still logged at DEBUG level.
if it's not under the condition logged at Warn level.

ex.getMessage(), ex.getResult().getValueDescriptor().getName(), ex);
}
} else {
log.info(logInfo, request.getCmdType(), request.getTraceID(),
log.warn(logInfo, request.getCmdType(), request.getTraceID(),
request.getGetBlock().getBlockID(),
ex.getMessage(), ex.getResult().getValueDescriptor().getName(), ex);
}
return getContainerCommandResponse(request, ex.getResult(), ex.getMessage())
Expand Down