From bbafde6d4aecbbfaa452570faeaa25b4058d3a28 Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期二, 22 八月 2023 15:55:43 +0800
Subject: [PATCH] 优化日志
---
ruoyi-admin/src/main/resources/banner.txt | 12 -----
ruoyi-system/src/main/java/com/ruoyi/authorize/common/AuthorizeUtil.java | 12 +++--
ruoyi-admin/src/main/resources/logback.xml | 60 +++---------------------------
ard-work/src/main/java/com/ruoyi/inspect/service/impl/InspectionTaskManager.java | 2
ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectTaskServiceImpl.java | 2
ard-work/src/main/java/com/ruoyi/inspect/service/impl/InspectionTask.java | 2
ard-work/src/main/resources/mapper/minio/StorageMinioEventMapper.xml | 1
7 files changed, 18 insertions(+), 73 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectTaskServiceImpl.java b/ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectTaskServiceImpl.java
index 5644b88..0e09344 100644
--- a/ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectTaskServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectTaskServiceImpl.java
@@ -31,7 +31,7 @@
* @date 2023-05-30
*/
@Service
-@Slf4j(topic = "PatrolInspectionTask")
+@Slf4j(topic = "patrolInspectionTask")
public class ArdVideoInspectTaskServiceImpl implements IArdVideoInspectTaskService {
@Resource
private ArdVideoInspectTaskMapper ardVideoInspectTaskMapper;
diff --git a/ard-work/src/main/java/com/ruoyi/inspect/service/impl/InspectionTask.java b/ard-work/src/main/java/com/ruoyi/inspect/service/impl/InspectionTask.java
index 65b4e5e..62bd764 100644
--- a/ard-work/src/main/java/com/ruoyi/inspect/service/impl/InspectionTask.java
+++ b/ard-work/src/main/java/com/ruoyi/inspect/service/impl/InspectionTask.java
@@ -12,7 +12,7 @@
* @Date: 2023骞�06鏈�01鏃�8:57
* @Version: 1.0
**/
-@Slf4j(topic = "PatrolInspectionTask")
+@Slf4j(topic = "patrolInspectionTask")
class InspectionTask implements Runnable {
private String taskId;
diff --git a/ard-work/src/main/java/com/ruoyi/inspect/service/impl/InspectionTaskManager.java b/ard-work/src/main/java/com/ruoyi/inspect/service/impl/InspectionTaskManager.java
index d440ac7..bf0ff9d 100644
--- a/ard-work/src/main/java/com/ruoyi/inspect/service/impl/InspectionTaskManager.java
+++ b/ard-work/src/main/java/com/ruoyi/inspect/service/impl/InspectionTaskManager.java
@@ -22,7 +22,7 @@
**/
@Component
-@Slf4j(topic = "PatrolInspectionTask")
+@Slf4j(topic = "patrolInspectionTask")
public class InspectionTaskManager {
@Resource
diff --git a/ard-work/src/main/resources/mapper/minio/StorageMinioEventMapper.xml b/ard-work/src/main/resources/mapper/minio/StorageMinioEventMapper.xml
index 9a6d13b..0fdbcad 100644
--- a/ard-work/src/main/resources/mapper/minio/StorageMinioEventMapper.xml
+++ b/ard-work/src/main/resources/mapper/minio/StorageMinioEventMapper.xml
@@ -28,6 +28,7 @@
<if test="eventType != null and eventType != ''"> and event_type = #{eventType}</if>
<if test="host != null and host != ''"> and host = #{host}</if>
</where>
+ order by create_time desc
</select>
<select id="selectStorageMinioEventById" parameterType="String" resultMap="StorageMinioEventResult">
diff --git a/ruoyi-admin/src/main/resources/banner.txt b/ruoyi-admin/src/main/resources/banner.txt
index 53d0f3d..4a3834f 100644
--- a/ruoyi-admin/src/main/resources/banner.txt
+++ b/ruoyi-admin/src/main/resources/banner.txt
@@ -1,13 +1,3 @@
Application Version: ${ard.version}
Spring Boot Version: ${spring-boot.version}
- ___ ___ ___
- /\ \ /\ \ /\ \
- /::\ \ /::\ \ /::\ \
- /:/\:\ \ /:/\:\ \ /:/\:\ \
- /::\~\:\ \ /::\~\:\ \ /:/ \:\__\
- /:/\:\ \:\__/:/\:\ \:\__/:/__/ \:|__|
- \/__\:\/:/ \/_|::\/:/ \:\ \ /:/ /
- \::/ / |:|::/ / \:\ /:/ /
- /:/ / |:|\/__/ \:\/:/ /
- /:/ / |:| | \::/__/
- \/__/ \|__| ~~
+瀹夌憺杈�4.0骞冲彴寮�濮嬪惎鍔�
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/logback.xml b/ruoyi-admin/src/main/resources/logback.xml
index dfa352c..6cef4b9 100644
--- a/ruoyi-admin/src/main/resources/logback.xml
+++ b/ruoyi-admin/src/main/resources/logback.xml
@@ -69,11 +69,11 @@
</encoder>
</appender>
<!-- Authorize鏃ュ織杈撳嚭 -->
- <appender name="Authorize" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${log.path}/Authorize.log</file>
+ <appender name="authorize" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${log.path}/authorize.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 鎸夊ぉ鍥炴粴 daily -->
- <fileNamePattern>${log.path}/Authorize.%d{yyyy-MM-dd}.log</fileNamePattern>
+ <fileNamePattern>${log.path}/authorize.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 鏃ュ織鏈�澶х殑鍘嗗彶 60澶� -->
<maxHistory>60</maxHistory>
</rollingPolicy>
@@ -160,11 +160,11 @@
</encoder>
</appender>
<!--PatrolInspectionTask鏃ュ織杈撳嚭-->
- <appender name="PatrolInspectionTask" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${log.path}/PatrolInspectionTask.log</file>
+ <appender name="patrolInspectionTask" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${log.path}/patrolInspectionTask.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--鎸夊ぉ鍥炴粴daily-->
- <fileNamePattern>${log.path}/PatrolInspectionTask.%d{yyyy-MM-dd}.log</fileNamePattern>
+ <fileNamePattern>${log.path}/patrolInspectionTask.%d{yyyy-MM-dd}.log</fileNamePattern>
<!--鏃ュ織鏈�澶х殑鍘嗗彶60澶�-->
<maxHistory>60</maxHistory>
</rollingPolicy>
@@ -241,53 +241,5 @@
<!--绯荤粺鐢ㄦ埛鎿嶄綔鏃ュ織-->
<logger name="sys-user" level="INFO">
<appender-ref ref="sys-user"/>
- </logger>
- <!--Authorize鏃ュ織-->
- <logger name="Authorize" level="INFO">
- <appender-ref ref="Authorize"/>
- </logger>
- <!--minio鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="minio" level="INFO">
- <appender-ref ref="minio"/>
- </logger>
- <!--hiksdk鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="hikSdk" level="debug">
- <appender-ref ref="hikSdk"/>
- </logger>
- <!--鐩楃數鎶ヨ鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="stealAlarm" level="INFO">
- <appender-ref ref="stealAlarm"/>
- </logger>
- <!--websocket鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="websocket" level="INFO">
- <appender-ref ref="websocket"/>
- </logger>
- <!--鍏夌數宸℃鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="PatrolInspectionTask" level="INFO">
- <appender-ref ref="PatrolInspectionTask"/>
- </logger>
- <!--mqtt鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="mqtt" level="debug">
- <appender-ref ref="mqtt"/>
- </logger>
- <!--guideQueue鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="guideQueue" level="INFO">
- <appender-ref ref="guideQueue"/>
- </logger>
- <!--rongCloud鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="rongCloud" level="INFO">
- <appender-ref ref="rongCloud"/>
- </logger>
- <!--cmd鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="cmd" level="INFO">
- <appender-ref ref="cmd"/>
- </logger>
- <!--鏃犱汉鏈烘棩蹇楁墦鍗扮瓑绾�-->
- <logger name="uav" level="INFO">
- <appender-ref ref="uav"/>
- </logger>
- <!--涓変竴杞﹁締鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="sy" level="INFO">
- <appender-ref ref="sy"/>
</logger>
</configuration>
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/authorize/common/AuthorizeUtil.java b/ruoyi-system/src/main/java/com/ruoyi/authorize/common/AuthorizeUtil.java
index be030c1..ba7446a 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/authorize/common/AuthorizeUtil.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/authorize/common/AuthorizeUtil.java
@@ -19,7 +19,7 @@
import javax.crypto.spec.SecretKeySpec;
import javax.xml.bind.DatatypeConverter;
-@Slf4j(topic="Authorize")
+@Slf4j(topic="authorize")
public class AuthorizeUtil {
public static String MachineCode="";
@@ -36,9 +36,9 @@
public static void main(String[] args) {
AuthorizeUtil ss = new AuthorizeUtil();
- System.out.println("sysStr " + ss.parsLicense());
- System.out.println("MachineCode " + ss.getMachineCode());
- System.out.println("CPUCode " + ss.getCPUCode());
+ log.debug("sysStr " + ss.parsLicense());
+ log.debug("MachineCode " + ss.getMachineCode());
+ log.debug("CPUCode " + ss.getCPUCode());
//String codeString=ss.parsLicense("b1db709f19d9769e536e2e29888e38b2");
//System.out.println(codeString);
//ss.makeTempLicense();
@@ -103,7 +103,9 @@
} catch (Exception e) {
log.error("鑾峰彇鏈哄櫒鐮佸紓甯革細"+e.getMessage());
}
- return Md5Utils.hash(sb.toString().toUpperCase());
+ String code = Md5Utils.hash(sb.toString().toUpperCase());
+ log.debug("鏈哄櫒鐮�:"+code);
+ return code;
}
public static String getCPUCode() {
--
Gitblit v1.9.3