提交待命1

master
胡锐 6 months ago
parent 46ca16891e
commit 2ef3d7dd67
  1. 3
      bweb/src/main/java/com/bweb/config/SysConfig.java
  2. 89
      order/src/main/resources/dev/logback.xml
  3. 133
      order/src/main/resources/prod/logback.xml

@ -1,5 +1,6 @@
package com.bweb.config; package com.bweb.config;
import lombok.Data;
import lombok.Getter; import lombok.Getter;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource; import org.springframework.context.annotation.PropertySource;
@ -8,7 +9,7 @@ import org.springframework.stereotype.Component;
@Component("sysConfig") @Component("sysConfig")
@ConfigurationProperties @ConfigurationProperties
@PropertySource("classpath:/config.properties") @PropertySource("classpath:/config.properties")
@Getter @Data
public class SysConfig { public class SysConfig {
private String fileUrl; private String fileUrl;

@ -92,6 +92,95 @@
<appender-ref ref="ScPetroLog" /> <appender-ref ref="ScPetroLog" />
</logger> </logger>
<!-- 支付通知 -->
<appender name="PayNotifyLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/PayNotifyLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/PayNotify/PayNotifyLog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.order.controller.OrderPayNotifyController" level="INFO">
<appender-ref ref="PayNotifyLog" />
</logger>
<!-- 支付通知 -->
<!-- 汇联通卡券 -->
<appender name="HltCouponLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/HltCouponLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/HltCoupon/HltCouponLog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hfkj.service.coupon.channel.HuiLianTongCouponService" level="INFO">
<appender-ref ref="HltCouponLog" />
</logger>
<!-- 汇联通卡券 -->
<!-- 汇联通工会卡 -->
<appender name="HltCardLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/HltCardLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/HltCard/HltCouponLog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hfkj.service.hlt.HuiLianTongUnionCardService" level="INFO">
<appender-ref ref="HltCardLog" />
</logger>
<!-- 汇联通工会卡 -->
<!-- 汇联通工会卡 -->
<appender name="ChongQingCNPCLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/ChongQingCNPCLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/ChongQingCNPC/ChongQingCNPCLog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hfkj.service.coupon.channel.ChongQingCNPCCouponService" level="INFO">
<appender-ref ref="ChongQingCNPCLog" />
</logger>
<!-- 汇联通工会卡 -->
<!-- 中油优途中石油卡券 --> <!-- 中油优途中石油卡券 -->
<appender name="PcytCNPCCouponLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> <appender name="PcytCNPCCouponLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/petroLog.log</File> <File>log/petroLog.log</File>

@ -69,4 +69,137 @@
<logger name="com.hfkj" level="ERROR"> <logger name="com.hfkj" level="ERROR">
<appender-ref ref="errorlog" /> <appender-ref ref="errorlog" />
</logger> </logger>
<!-- 定制日志 -->
<!-- 四川中石油 -->
<appender name="ScPetroLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/petroLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/ScPetroLog/ScPetroLog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hfkj.service.coupon.channel.PetroConfig" level="INFO">
<appender-ref ref="ScPetroLog" />
</logger>
<!-- 支付通知 -->
<appender name="PayNotifyLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/PayNotifyLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/PayNotify/PayNotifyLog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.order.controller.OrderPayNotifyController" level="INFO">
<appender-ref ref="PayNotifyLog" />
</logger>
<!-- 支付通知 -->
<!-- 汇联通卡券 -->
<appender name="HltCouponLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/HltCouponLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/HltCoupon/HltCouponLog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hfkj.service.coupon.channel.HuiLianTongCouponService" level="INFO">
<appender-ref ref="HltCouponLog" />
</logger>
<!-- 汇联通卡券 -->
<!-- 汇联通工会卡 -->
<appender name="HltCardLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/HltCardLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/HltCard/HltCouponLog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hfkj.service.hlt.HuiLianTongUnionCardService" level="INFO">
<appender-ref ref="HltCardLog" />
</logger>
<!-- 汇联通工会卡 -->
<!-- 汇联通工会卡 -->
<appender name="ChongQingCNPCLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/ChongQingCNPCLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/ChongQingCNPC/ChongQingCNPCLog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hfkj.service.coupon.channel.ChongQingCNPCCouponService" level="INFO">
<appender-ref ref="ChongQingCNPCLog" />
</logger>
<!-- 汇联通工会卡 -->
<!-- 中油优途中石油卡券 -->
<appender name="PcytCNPCCouponLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/petroLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/PcytCNPC/PcytCNPCCouponLog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hfkj.service.coupon.channel.PcytCNPCCouponConfig" level="INFO">
<appender-ref ref="PcytCNPCCouponLog" />
</logger>
</configuration> </configuration>

Loading…
Cancel
Save