From b96a52c9af3f14936f65c919512e6081336505f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E6=96=8C?= <38912748@qq.com> Date: Thu, 4 Jul 2024 09:56:37 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8Slf4j=E6=B3=A8=E8=A7=A3?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 阿斌 <38912748@qq.com> --- .../genersoft/iot/vmp/conf/SystemInfoTimerTask.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/SystemInfoTimerTask.java b/src/main/java/com/genersoft/iot/vmp/conf/SystemInfoTimerTask.java index 0c6eb2359..3ec984e3d 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/SystemInfoTimerTask.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/SystemInfoTimerTask.java @@ -1,8 +1,10 @@ package com.genersoft.iot.vmp.conf; +import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.cmd.AlarmQueryMessageHandler; import com.genersoft.iot.vmp.storager.IRedisCatchStorage; import com.genersoft.iot.vmp.utils.SystemInfoUtils; -import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @@ -13,10 +15,11 @@ import java.util.Map; /** * 获取系统信息写入redis */ -@Slf4j @Component public class SystemInfoTimerTask { + private Logger logger = LoggerFactory.getLogger(SystemInfoTimerTask.class); + @Autowired private IRedisCatchStorage redisCatchStorage; @@ -32,10 +35,10 @@ public class SystemInfoTimerTask { List> diskInfo =SystemInfoUtils.getDiskInfo(); redisCatchStorage.addDiskInfo(diskInfo); } catch (InterruptedException e) { - log.error("[获取系统信息失败] {}", e.getMessage()); + logger.error("[获取系统信息失败] {}", e.getMessage()); } } -} +} \ No newline at end of file