From ed7b6236ec79ef8d9d11632591ebf36f057b7b57 Mon Sep 17 00:00:00 2001 From: ludj Date: Fri, 6 Jan 2023 14:30:35 +0800 Subject: [PATCH] =?UTF-8?q?OPC=E5=90=8C=E6=AD=A5=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/nl/acs/opc/DeviceOpcProtocolRunable.java | 10 ++++++---- .../src/main/resources/logback-spring.xml | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java b/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java index fa52be5..576f32b 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java @@ -185,8 +185,11 @@ public class DeviceOpcProtocolRunable implements Runnable { } } while (ObjectUtil.equal(value, his));//如果两次的值相等,不走下面的代码 + log.info("如果两次的值相等,不走下面的代码"); + OpcItemDto itemDto = this.getItem(item.getId()); - if (itemDto.getNeed_log() != null && itemDto.getNeed_log()) { +// if (itemDto.getNeed_log() != null && itemDto.getNeed_log()) { + if (true) { StringBuilder sb = new StringBuilder(); //设备的ITEM项 List relate_items = itemDto.getRelate_items(); @@ -203,14 +206,13 @@ public class DeviceOpcProtocolRunable implements Runnable { } //设置值 accessor_value.setValue(item.getId(), value); - } } - System.out.println("opc线程停止。。。"); + log.info("opc线程停止。。。"); return; } catch (Exception var30) { if (!DeviceOpcSynchronizeAutoRun.isRun) { - System.out.println("opc线程停止2。。。"); + log.info("opc线程停止2。。。"); if (server != null) { try { server.disconnect(); diff --git a/acs/nladmin-system/src/main/resources/logback-spring.xml b/acs/nladmin-system/src/main/resources/logback-spring.xml index 1781d46..920db85 100644 --- a/acs/nladmin-system/src/main/resources/logback-spring.xml +++ b/acs/nladmin-system/src/main/resources/logback-spring.xml @@ -183,6 +183,10 @@ https://juejin.cn/post/6844903775631572999 + + + +