From 99f75b680577e446101ca83366e76325ba8cdd38 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Mon, 5 Jan 2026 14:59:33 +0800 Subject: [PATCH] =?UTF-8?q?style(log):=20=E7=A7=BB=E9=99=A4=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E8=BE=93=E5=87=BA=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了 BceFaceBodyAdapter 中无法访问URL图片的警告日志 - 移除了 VideoPieceGetter 中计数器更新和进度检查的调试日志 - 清理了设备关联计数器相关的日志输出 - 移除了 placeholder 完成状态的日志记录 - 删除了进度检查相关的统计日志输出 --- .../facebody/adapter/BceFaceBodyAdapter.java | 4 ++-- .../com/ycwl/basic/task/VideoPieceGetter.java | 24 +++++++------------ 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/ycwl/basic/facebody/adapter/BceFaceBodyAdapter.java b/src/main/java/com/ycwl/basic/facebody/adapter/BceFaceBodyAdapter.java index c94c3ab8..8a3f5d39 100644 --- a/src/main/java/com/ycwl/basic/facebody/adapter/BceFaceBodyAdapter.java +++ b/src/main/java/com/ycwl/basic/facebody/adapter/BceFaceBodyAdapter.java @@ -162,7 +162,7 @@ public class BceFaceBodyAdapter implements IFaceBodyAdapter { return resp; } else if (errorCode == 222204) { // error_code: 222204 表示无法正常访问URL图片,尝试下载并转换为base64后重试 - log.warn("无法正常访问URL图片,错误码: 222204,尝试下载图片转base64后重试,URL: {}", faceUrl); +// log.warn("无法正常访问URL图片,错误码: 222204,尝试下载图片转base64后重试,URL: {}", faceUrl); String base64Image = downloadImageAsBase64(faceUrl); if (base64Image != null) { // 重试时也不需要限流,由外层调度器控制 @@ -338,7 +338,7 @@ public class BceFaceBodyAdapter implements IFaceBodyAdapter { return resp; } else if (errorCode == 222204) { // error_code: 222204 表示无法正常访问URL图片,尝试下载并转换为base64后重试 - log.warn("搜索人脸时无法正常访问URL图片,错误码: 222204,尝试下载图片转base64后重试,URL: {}", faceUrl); +// log.warn("搜索人脸时无法正常访问URL图片,错误码: 222204,尝试下载图片转base64后重试,URL: {}", faceUrl); String base64Image = downloadImageAsBase64(faceUrl); if (base64Image != null) { try { diff --git a/src/main/java/com/ycwl/basic/task/VideoPieceGetter.java b/src/main/java/com/ycwl/basic/task/VideoPieceGetter.java index ff3c876a..e9fa0fa8 100644 --- a/src/main/java/com/ycwl/basic/task/VideoPieceGetter.java +++ b/src/main/java/com/ycwl/basic/task/VideoPieceGetter.java @@ -212,12 +212,12 @@ public class VideoPieceGetter { AtomicInteger pairCount = currentUnFinPlaceholder.get(pairDeviceId.toString()); if (pairCount != null) { int remaining = pairCount.decrementAndGet(); - log.info("[计数器更新] 关联设备 {} 计数器递减,剩余={}, currentUnFinPlaceholder总数={}", - pairDeviceId, remaining, currentUnFinPlaceholder.size()); +// log.info("[计数器更新] 关联设备 {} 计数器递减,剩余={}, currentUnFinPlaceholder总数={}", +// pairDeviceId, remaining, currentUnFinPlaceholder.size()); if (remaining <= 0) { currentUnFinPlaceholder.remove(pairDeviceId.toString()); - log.debug("[Placeholder完成] 设备 {} 的placeholder已满足并移除,剩余设备数={}", - pairDeviceId, currentUnFinPlaceholder.size()); +// log.debug("[Placeholder完成] 设备 {} 的placeholder已满足并移除,剩余设备数={}", +// pairDeviceId, currentUnFinPlaceholder.size()); } } } @@ -229,25 +229,17 @@ public class VideoPieceGetter { AtomicInteger count = currentUnFinPlaceholder.get(faceSample.getDeviceId().toString()); if (count != null) { int remaining = count.decrementAndGet(); - log.info("[计数器更新] 设备 {} 计数器递减,剩余={}, currentUnFinPlaceholder总数={}", - faceSample.getDeviceId(), remaining, currentUnFinPlaceholder.size()); +// log.info("[计数器更新] 设备 {} 计数器递减,剩余={}, currentUnFinPlaceholder总数={}", +// faceSample.getDeviceId(), remaining, currentUnFinPlaceholder.size()); if (remaining <= 0) { currentUnFinPlaceholder.remove(faceSample.getDeviceId().toString()); - log.debug("[Placeholder完成] 设备 {} 的placeholder已满足并移除,剩余设备数={}", - faceSample.getDeviceId(), currentUnFinPlaceholder.size()); +// log.debug("[Placeholder完成] 设备 {} 的placeholder已满足并移除,剩余设备数={}", +// faceSample.getDeviceId(), currentUnFinPlaceholder.size()); } } // 如果有templateId,检查是否所有placeholder都已满足 if (templatePlaceholder != null) { - int totalPlaceholderCount = templatePlaceholder.size(); - int remainingCount = currentUnFinPlaceholder.values().stream() - .mapToInt(AtomicInteger::get) - .sum(); - log.info("[进度检查] 当前进度:已完成 {}/{},剩余 {} 个placeholder未满足,剩余设备数={}", - totalPlaceholderCount - remainingCount, totalPlaceholderCount, remainingCount, - currentUnFinPlaceholder.size()); - if (currentUnFinPlaceholder.isEmpty()) { // 使用 compareAndSet 保证原子性,避免多线程重复调用 callback if (invoke.compareAndSet(false, true)) {