增进日志输出
This commit is contained in:
@@ -84,7 +84,7 @@ public class DeviceOpcProtocolRunable implements Runnable {
|
||||
|
||||
try {
|
||||
itemsMap.put(string, group.addItem(string));
|
||||
log.trace("添加成功 {}", string);
|
||||
log.info("添加成功 {}", string);
|
||||
} catch (Exception var29) {
|
||||
err_message.append(string + ":" + var29.getMessage());
|
||||
if (!is_error) {
|
||||
@@ -116,9 +116,9 @@ public class DeviceOpcProtocolRunable implements Runnable {
|
||||
long begin = System.currentTimeMillis();
|
||||
Map<Item, ItemState> itemStatus = group.read(true, (Item[]) itemsMap.values().toArray(new Item[0]));
|
||||
long end = System.currentTimeMillis();
|
||||
log.trace("{} 开始记时{}", tag, DateUtil.now());
|
||||
log.info("{} 开始记时{}", tag, DateUtil.now());
|
||||
long duration = end - begin;
|
||||
log.trace("{} 读取耗时:{}", tag, duration);
|
||||
log.info("{} 读取耗时:{}", tag, duration);
|
||||
if (duration > 1000L) {
|
||||
if (!time_out) {
|
||||
log.warn("{} 读取超时 : {}", tag, duration);
|
||||
@@ -141,8 +141,8 @@ public class DeviceOpcProtocolRunable implements Runnable {
|
||||
do {
|
||||
if (!var18.hasNext()) {
|
||||
end = System.currentTimeMillis();
|
||||
log.trace("{}", itemsString);
|
||||
log.trace("{} 计算完成耗时{}", tag, end - begin);
|
||||
log.info("{}", itemsString);
|
||||
log.info("{} 计算完成耗时{}", tag, end - begin);
|
||||
Thread.sleep((long) OpcConfig.synchronized_millisecond);
|
||||
if (this.error_num != 0) {
|
||||
this.error_num = 0;
|
||||
|
||||
Reference in New Issue
Block a user