Skip to content

Commit

Permalink
Merge pull request #3210 from vmware/jhua/gcs-impl
Browse files Browse the repository at this point in the history
fix issue when DEBUG is on
  • Loading branch information
jhua-vmware authored Nov 6, 2024
2 parents 8bb0524 + b61218b commit 502a2fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2023 VMware, Inc.
* Copyright 2019-2024 VMware, Inc.
* SPDX-License-Identifier: EPL-2.0
*/
package com.vmware.vip.core.except;
Expand Down Expand Up @@ -70,7 +70,7 @@ public APIResponseDTO handler(Exception e) {
} else {
response.setResponse(new Response(APIResponseStatus.UNKNOWN_ERROR.getCode(), e.getMessage()));
String errorStr = MessageFormat.format("unknown error: {0}" ,e.getMessage());
logger.error(errorStr);
logger.error(errorStr, e);
}
String rstr = "[response] " + response.getResponse().toJSONString();
logger.info(rstr);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 VMware, Inc.
* Copyright 2019-2024 VMware, Inc.
* SPDX-License-Identifier: EPL-2.0
*/
package com.vmware.vip.i18n.api.base;
Expand Down Expand Up @@ -80,7 +80,7 @@ protected APIResponseDTO handleResponse(int code, String message,
r.setMessage(message);
r.setServerTime(LocalDateTime.now().toString());
d.setResponse(r);
if (logger.isDebugEnabled()) {
if (logger.isDebugEnabled() && d.getData() != null) {
String logOfResData = "The response data: "
+ d.getData().toString();
logger.debug(logOfResData);
Expand Down

0 comments on commit 502a2fd

Please sign in to comment.