fix: 日志文件乱码修复日志配置,修复读取信号转换异常
This commit is contained in:
@@ -150,13 +150,13 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
/**
|
||||
* 下发目标站
|
||||
*/
|
||||
int to_target = 0;
|
||||
int last_to_target = 0;
|
||||
String to_target = null;
|
||||
String last_to_target = null;
|
||||
/**
|
||||
* 下发任务号
|
||||
*/
|
||||
int to_task = 0;
|
||||
int last_to_task = 0;
|
||||
String to_task = null;
|
||||
String last_to_task = null;
|
||||
/**
|
||||
* 下发接纯数字托盘号
|
||||
*/
|
||||
|
||||
@@ -110,15 +110,15 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_task);
|
||||
}
|
||||
|
||||
public int getTo_task() {
|
||||
return this.getOpcIntegerValue(item_to_task);
|
||||
public String getTo_task() {
|
||||
return this.getOpcStringValue(item_to_task);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public int getTotarget() {
|
||||
return this.getOpcIntegerValue(item_to_target);
|
||||
public String getTotarget() {
|
||||
return this.getOpcStringValue(item_to_target);
|
||||
}
|
||||
|
||||
public String getTo_command() {
|
||||
|
||||
@@ -121,8 +121,8 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
String to_task = null;
|
||||
String last_to_task = null;
|
||||
|
||||
int to_container_type = 0;
|
||||
int last_to_container_type = 0;
|
||||
String to_container_type = null;
|
||||
String last_to_container_type = null;
|
||||
|
||||
String to_height_level = null;
|
||||
String last_to_height_level = null;
|
||||
|
||||
@@ -148,8 +148,8 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_container_type);
|
||||
}
|
||||
|
||||
public int getTo_container_type(){
|
||||
return this.getOpcIntegerValue(item_to_container_type);
|
||||
public String getTo_container_type(){
|
||||
return this.getOpcStringValue(item_to_container_type);
|
||||
}
|
||||
|
||||
public String getTo_height_level(){
|
||||
|
||||
@@ -30,11 +30,9 @@ https://juejin.cn/post/6844903775631572999
|
||||
<withJansi>true</withJansi>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>${log.pattern}</pattern>
|
||||
<charset>${log.charset}</charset>
|
||||
<!--<charset>${log.charset}</charset>-->
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
@@ -50,6 +48,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>${log.charset}</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user