From c62a8986dd27788f4cee2a1da477868d002c4885 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Tue, 8 Nov 2022 20:40:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BA=BF=E7=A8=8B=E4=BC=91?= =?UTF-8?q?=E7=9C=A0=E5=BC=82=E5=B8=B8=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/genersoft/iot/vmp/utils/SystemInfoUtils.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/genersoft/iot/vmp/utils/SystemInfoUtils.java b/src/main/java/com/genersoft/iot/vmp/utils/SystemInfoUtils.java index d228787b..ec2f3b22 100644 --- a/src/main/java/com/genersoft/iot/vmp/utils/SystemInfoUtils.java +++ b/src/main/java/com/genersoft/iot/vmp/utils/SystemInfoUtils.java @@ -1,5 +1,8 @@ package com.genersoft.iot.vmp.utils; +import com.genersoft.iot.vmp.media.zlm.ZLMHttpHookListener; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.util.ObjectUtils; import oshi.SystemInfo; import oshi.hardware.*; @@ -21,6 +24,8 @@ import java.util.concurrent.TimeUnit; */ public class SystemInfoUtils { + private final static Logger logger = LoggerFactory.getLogger(SystemInfoUtils.class); + /** * 获取cpu信息 * @return @@ -73,7 +78,7 @@ public class SystemInfoUtils { try { Thread.sleep(1000); } catch (InterruptedException e) { - throw new RuntimeException(e); + logger.error("[线程休眠失败] : {}", e.getMessage()); } List afterNetworkIFs = hal.getNetworkIFs(); NetworkIF afterNet = afterNetworkIFs.get(afterNetworkIFs.size() - 1);