Skip to content

Commit

Permalink
Remove unnecessary fields from ModelMesh logs (#150)
Browse files Browse the repository at this point in the history
Payload processor logs display the entirety of the `Payload`, including
metadata and request contents.
This is not necessary at the log level.

---------

Signed-off-by: Rui Vieira <[email protected]>
  • Loading branch information
ruivieira authored Sep 4, 2024
1 parent 3a44450 commit 6ea70e2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/main/java/com/ibm/watson/modelmesh/payload/Payload.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ public String toString() {
", modelId='" + modelId + '\'' +
", method='" + method + '\'' +
", status=" + (status == null ? "request" : String.valueOf(status)) +
", metadata=" + metadata +
", data=" + (data != null ? data.readableBytes() + "B" : "") +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private boolean sendPayload(Payload payload) {

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() != 200) {
logger.warn("Processing {} with request {} didn't succeed: {}", payload, payloadContent, response);
logger.warn("Processing {} didn't succeed: {}", payload, response);
}
} catch (Throwable e) {
logger.error("An error occurred while sending payload {} to {}: {}", payload, uri, e.getCause());
Expand Down

0 comments on commit 6ea70e2

Please sign in to comment.