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

fix issue when DEBUG is on #3210

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
@@ -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
Loading