Browse Source

no message

master
周俊杰 2 years ago
parent
commit
e3745f0078
  1. 29
      acs/hd/nladmin-system/src/main/resources/log/AcsToErp.xml
  2. 28
      acs/hd/nladmin-system/src/main/resources/log/AgvFeedbackServiceImpl.xml
  3. 30
      acs/hd/nladmin-system/src/main/resources/log/AgvLeaveServlet.xml
  4. 32
      acs/hd/nladmin-system/src/main/resources/log/MagicAgvServiceImpl.xml
  5. 10
      acs/hd/nladmin-system/src/main/resources/log/QueryAgvTaskStatus.xml

29
acs/hd/nladmin-system/src/main/resources/log/AcsToErp.xml

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<included>
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
<property name="log.pattern"
value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %gray(%msg%n)"/>
<springProperty scope="context" name="lokiUrl" source="loki.url"/>
<property name="LOKI_URL" value="${lokiUrl}"/>
<!--添加loki-->
<appender name="lokiAppender" class="com.github.loki4j.logback.Loki4jAppender">
<batchTimeoutMs>1000</batchTimeoutMs>
<http class="com.github.loki4j.logback.ApacheHttpSender">
<url>${LOKI_URL}</url>
</http>
<format>
<label>
<pattern>logType=acs_to_erp</pattern>
</label>
<message>
<pattern>${log.pattern}</pattern>
</message>
<sortByTime>true</sortByTime>
</format>
</appender>
<!-- 打印sql -->
<logger name="org.nl.acs.ext.erp.service.impl.AcsToErpServiceImpl" level="info" additivity="false">
<appender-ref ref="lokiAppender" />
</logger>
</included>

28
acs/hd/nladmin-system/src/main/resources/log/AgvFeedbackServiceImpl.xml

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<included>
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
<property name="log.pattern"
value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %gray(%msg%n)"/>
<springProperty scope="context" name="lokiUrl" source="loki.url"/>
<property name="LOKI_URL" value="${lokiUrl}"/>
<!--添加loki-->
<appender name="lokiAppender" class="com.github.loki4j.logback.Loki4jAppender">
<batchTimeoutMs>1000</batchTimeoutMs>
<http class="com.github.loki4j.logback.ApacheHttpSender">
<url>${LOKI_URL}</url>
</http>
<format>
<label>
<pattern>logType=agv_feedback_servlet</pattern>
</label>
<message>
<pattern>${log.pattern}</pattern>
</message>
<sortByTime>true</sortByTime>
</format>
</appender>
<!-- 打印sql -->
<logger name="org.nl.acs.agv.server.impl.AgvServiceImpl" level="info" additivity="false">
<appender-ref ref="lokiAppender" />
</logger>
</included>

30
acs/hd/nladmin-system/src/main/resources/log/AgvLeaveServlet.xml

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<included>
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
<property name="log.pattern"
value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %gray(%msg%n)"/>
<springProperty scope="context" name="lokiUrl" source="loki.url"/>
<property name="LOKI_URL" value="${lokiUrl}"/>
<!--添加loki-->
<appender name="lokiAppender" class="com.github.loki4j.logback.Loki4jAppender">
<batchTimeoutMs>1000</batchTimeoutMs>
<http class="com.github.loki4j.logback.ApacheHttpSender">
<url>${LOKI_URL}</url>
</http>
<format>
<label>
<pattern>logType=agv_leave_servlet</pattern>
</label>
<message>
<pattern>${log.pattern}</pattern>
</message>
<sortByTime>true</sortByTime>
</format>
</appender>
<!-- 打印sql -->
<logger name="org.nl.acs.device_driver.electric_fence.ItemProtocol" level="info" additivity="false">
<appender-ref ref="lokiAppender" />
</logger>
</included>

32
acs/hd/nladmin-system/src/main/resources/log/MagicAgvServiceImpl.xml

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<included>
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
<property name="LOG_HOME" value="${logPath}"/>
<!-- 按照每天生成日志文件 -->
<appender name="FILEAgvServiceImpl" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/查询agv状态/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<!--单个日志最大容量 至少10MB才能看得出来-->
<maxFileSize>200MB</maxFileSize>
<!--所有日志最多占多大容量-->
<totalSizeCap>2GB</totalSizeCap>
</rollingPolicy>
<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>
</encoder>
</appender>
<!-- <logger name="org.nl.start.Init" level="info" additivity="false">
<appender-ref ref="FILE3"/>
</logger>-->
<!-- 打印sql -->
<logger name="org.nl.acs.ext.wms.service.impl.AgvServiceImpl" level="info" additivity="false">
<appender-ref ref="FILEAgvServiceImpl"/>
</logger>
</included>

10
acs/hd/nladmin-system/src/main/resources/log/QueryAgvTaskStatus.xml

@ -3,14 +3,14 @@
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/> <springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
<property name="LOG_HOME" value="${logPath}"/> <property name="LOG_HOME" value="${logPath}"/>
<!-- 按照每天生成日志文件 --> <!-- 按照每天生成日志文件 -->
<appender name="FILEMagicAgvServiceImpl" class="ch.qos.logback.core.rolling.RollingFileAppender"> <appender name="FILEACSTOWMS" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名--> <!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/查询AGV设备状态/%d{yyyy-MM-dd}.%i.log</FileNamePattern> <FileNamePattern>${LOG_HOME}/ACS请求WMS/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数--> <!--日志文件保留天数-->
<maxHistory>15</maxHistory> <maxHistory>15</maxHistory>
<!--单个日志最大容量 至少10MB才能看得出来--> <!--单个日志最大容量 至少10MB才能看得出来-->
<maxFileSize>100MB</maxFileSize> <maxFileSize>50MB</maxFileSize>
<!--所有日志最多占多大容量--> <!--所有日志最多占多大容量-->
<totalSizeCap>2GB</totalSizeCap> <totalSizeCap>2GB</totalSizeCap>
</rollingPolicy> </rollingPolicy>
@ -26,7 +26,7 @@
</logger>--> </logger>-->
<!-- 打印sql --> <!-- 打印sql -->
<logger name="org.nl.acs.ext.wms.service.impl.MagicAgvServiceImpl" level="info" additivity="false"> <logger name="org.nl.acs.agv.server.impl.AgvServiceImpl" level="info" additivity="false">
<appender-ref ref="FILEMagicAgvServiceImpl"/> <appender-ref ref="FILEACSTOWMS"/>
</logger> </logger>
</included> </included>

Loading…
Cancel
Save