From 42f471b3bb53349775794a3fe8d8d48081523551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EB=91=90=EC=9B=90?= <96522218+D-w-nJ@users.noreply.github.com> Date: Wed, 27 Sep 2023 16:48:19 +0900 Subject: [PATCH] log only if received material count is over zero --- src/main/java/com/m9d/sroom/gpt/service/GPTService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/m9d/sroom/gpt/service/GPTService.java b/src/main/java/com/m9d/sroom/gpt/service/GPTService.java index 64a5832d..aef0ec30 100644 --- a/src/main/java/com/m9d/sroom/gpt/service/GPTService.java +++ b/src/main/java/com/m9d/sroom/gpt/service/GPTService.java @@ -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); }