Skip to content

Commit

Permalink
log only if received material count is over zero
Browse files Browse the repository at this point in the history
  • Loading branch information
D-w-nJ authored Sep 27, 2023
1 parent bf77185 commit 42f471b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/m9d/sroom/gpt/service/GPTService.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ private MaterialVo getMaterialVo(String resultStr) throws NullPointerException {
MaterialVo resultVo = null;
try {
resultVo = gson.fromJson(resultStr, MaterialVo.class);
log.info("received video material count is = {}", resultVo.getResults().size());
if(resultVo.getResults().size() > 0) {
log.info("received video material count is = {}", resultVo.getResults().size());
}
} catch (JsonSyntaxException e) {
log.error("Failed to parse JSON to MaterialVo. Input JSON: {}", resultStr, e);
}
Expand Down

0 comments on commit 42f471b

Please sign in to comment.