Merge remote-tracking branch 'origin/station' into station
This commit is contained in:
commit
a732adbd92
|
@ -13,7 +13,7 @@ public interface GardsSampleDataMapper extends BaseMapper<GardsSampleData> {
|
|||
@Select(value = "select " +
|
||||
"gsd.SAMPLE_ID as sampleId,gsd.input_file_name as inputFileName " +
|
||||
"from ORIGINAL.GARDS_SAMPLE_AUX gsa inner join ORIGINAL.GARDS_SAMPLE_DATA gsd on gsa.sample_id = gsd.sample_id " +
|
||||
"where gsa.measurement_id = #{measurementId} and gsd.SAMPLE_TYPE = #{systemType} and gsd.data_type=#{dataType} and TRIM(gsd.SITE_DET_CODE) = #{detectorId}")
|
||||
"where gsa.measurement_id = #{measurementId} and gsd.SAMPLE_TYPE = #{systemType} and gsd.data_type=#{dataType} AND SPECTRAL_QUALIFIE='FULL' and TRIM(gsd.SITE_DET_CODE) = #{detectorId}")
|
||||
public List<GardsSampleData> getSampleIdAndInputFileName(@Param("measurementId") String measurementId, @Param("dataType") String dataType, @Param("systemType") String systemType, String detectorId);
|
||||
|
||||
@Update(value = "UPDATE ORIGINAL.GARDS_SAMPLE_DATA SET STATUS=#{status} WHERE INPUT_FILE_NAME=#{inputFileName}")
|
||||
|
|
|
@ -670,7 +670,9 @@ public class Sample_G_Analysis {
|
|||
calibration.setModdate(new Date());
|
||||
calibrations.add(calibration);
|
||||
}
|
||||
serviceQuotes.getGardsCalibrationService().createBatch(calibrations);
|
||||
if (calibrations.size() > 0) {
|
||||
serviceQuotes.getGardsCalibrationService().createBatch(calibrations);
|
||||
}
|
||||
}
|
||||
|
||||
public void savePeaks(GStoreMiddleProcessData middleData,Integer sampleId, Integer IdAnalysis){
|
||||
|
|
|
@ -590,7 +590,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
|||
// spectrumQueryWrapper.eq(GardsSpectrum::getSampleType, "G");
|
||||
// spectrumQueryWrapper.eq(GardsSpectrum::getSampleId, sampleId);
|
||||
// GardsSpectrum gardsSpectrum = gardsSpectrumMapper.selectOne(spectrumQueryWrapper);
|
||||
if (Objects.nonNull(sourceData)){
|
||||
if (CollectionUtils.isNotEmpty(sourceData.g_counts)){
|
||||
gSpectrumBlock = new GammaSpectrum();
|
||||
// Map<String, Object> map = readLineUtil.readLine(gardsSpectrum.getFilename(), SampleFileHeader.GSPECTRUM.getMessage());
|
||||
// List<Integer> gSpectrumSubBlock = new LinkedList<>();
|
||||
|
@ -614,7 +614,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
|||
// spectrumQueryWrapper.eq(GardsSpectrum::getSampleType, "B");
|
||||
// spectrumQueryWrapper.eq(GardsSpectrum::getSampleId, sampleId);
|
||||
// GardsSpectrum gardsSpectrum = gardsSpectrumMapper.selectOne(spectrumQueryWrapper);
|
||||
if (Objects.nonNull(sourceData)){
|
||||
if (CollectionUtils.isNotEmpty(sourceData.b_counts)){
|
||||
bSpectrumBlock = new BetaSpectrum();
|
||||
// Map<String, Object> map = readLineUtil.readLine(gardsSpectrum.getFilename(), SampleFileHeader.BSPECTRUM.getMessage());
|
||||
// List<Integer> bSpectrumSubBlock = new LinkedList<>();
|
||||
|
@ -637,7 +637,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
|||
// LambdaQueryWrapper<GardsHistogram> histogramQueryWrapper = new LambdaQueryWrapper<>();
|
||||
// histogramQueryWrapper.eq(GardsHistogram::getSampleId, sampleId);
|
||||
// GardsHistogram gardsHistogram = gardsHistogramMapper.selectOne(histogramQueryWrapper);
|
||||
if (Objects.nonNull(sourceData)){
|
||||
if (CollectionUtils.isNotEmpty(sourceData.h_counts)){
|
||||
histogramBlock = new Histogram();
|
||||
List<HistogramData> histogramSubBlock = readValue(sourceData);
|
||||
// Map<String, Object> map = readLineUtil.readLine(gardsHistogram.getFilename(), SampleFileHeader.HISTOGRAM.getMessage());
|
||||
|
@ -668,19 +668,12 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
|||
// sampleCertQueryWrapper.eq(GardsSampleCert::getSampleId, sampleId);
|
||||
// GardsSampleCert gardsSampleCert = gardsSampleCertMapper.selectOne(sampleCertQueryWrapper);
|
||||
try {
|
||||
if (Objects.nonNull(sourceData)) {
|
||||
if (Objects.nonNull(sourceData.total_source_activity) && StringUtils.isNotBlank(sourceData.assay_date) && StringUtils.isNotBlank(sourceData.assay_time) && StringUtils.isNotBlank(sourceData.units_activity)) {
|
||||
certificateBlock = new Certificate();
|
||||
if (Objects.nonNull(sourceData.total_source_activity)){
|
||||
certificateBlock.setTotalSourceActivity(sourceData.total_source_activity);
|
||||
}
|
||||
if (StringUtils.isNotBlank(sourceData.assay_date) && StringUtils.isNotBlank(sourceData.assay_time)){
|
||||
Date assayDate = DateUtils.parseDate(sourceData.assay_date + " " + sourceData.assay_time);
|
||||
certificateBlock.setAssayDate(DateUtils.formatDate(assayDate, "yyyy-MM-dd HH:mm:ss"));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(sourceData.units_activity)){
|
||||
certificateBlock.setUnitsOfActivity(sourceData.units_activity);
|
||||
}
|
||||
certificateBlock.setTotalSourceActivity(sourceData.total_source_activity);
|
||||
Date assayDate = DateUtils.parseDate(sourceData.assay_date + " " + sourceData.assay_time);
|
||||
certificateBlock.setAssayDate(DateUtils.formatDate(assayDate, "yyyy-MM-dd HH:mm:ss"));
|
||||
certificateBlock.setUnitsOfActivity(sourceData.units_activity);
|
||||
}
|
||||
// LambdaQueryWrapper<GardsSampleCertLine> sampleCertLineQueryWrapper = new LambdaQueryWrapper<>();
|
||||
// sampleCertLineQueryWrapper.eq(GardsSampleCertLine::getSampleId, sampleId);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
<!--定义日志文件的存储地址 -->
|
||||
<property name="LOG_HOME" value="../logs" />
|
||||
<property name="ERROR_LOG_HOME" value="../errorLogs" />
|
||||
<property name="LOG_HOME" value="./logs/log" />
|
||||
<property name="ERROR_LOG_HOME" value="./logs/errorLog" />
|
||||
|
||||
<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
|
||||
<!-- 控制台输出 -->
|
||||
|
@ -30,17 +30,23 @@
|
|||
</appender>
|
||||
|
||||
<!-- 生成 error html格式日志开始 -->
|
||||
<appender name="HTML" class="ch.qos.logback.core.FileAppender">
|
||||
<appender name="HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<!--设置日志级别,过滤掉info日志,只输入error日志-->
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${ERROR_LOG_HOME}/abnormal-alarm-error-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="ch.qos.logback.classic.html.HTMLLayout">
|
||||
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
<file>${ERROR_LOG_HOME}/abnormal-alarm-error.html</file>
|
||||
</appender>
|
||||
<!-- 生成 error html格式日志结束 -->
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
<!--定义日志文件的存储地址 -->
|
||||
<property name="LOG_HOME" value="../logs" />
|
||||
<property name="ERROR_LOG_HOME" value="../errorLogs" />
|
||||
<property name="LOG_HOME" value="./logs/log" />
|
||||
<property name="LOG_CONSOLE_HOME" value="./logs/console" />
|
||||
<property name="ERROR_LOG_HOME" value="./logs/errorLog" />
|
||||
|
||||
<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
|
||||
<!-- 控制台输出 -->
|
||||
|
@ -14,6 +15,24 @@
|
|||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="FILE_INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<!--设置日志级别,过滤掉info日志,只输入error日志-->
|
||||
<level>INFO</level>
|
||||
</filter>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${LOG_CONSOLE_HOME}/auto-process-%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
</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}:%L - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
|
@ -30,17 +49,23 @@
|
|||
</appender>
|
||||
|
||||
<!-- 生成 error html格式日志开始 -->
|
||||
<appender name="HTML" class="ch.qos.logback.core.FileAppender">
|
||||
<appender name="HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<!--设置日志级别,过滤掉info日志,只输入error日志-->
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${ERROR_LOG_HOME}/auto-process-error-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="ch.qos.logback.classic.html.HTMLLayout">
|
||||
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
<file>${ERROR_LOG_HOME}/auto-process-error.html</file>
|
||||
</appender>
|
||||
<!-- 生成 error html格式日志结束 -->
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@ server:
|
|||
accesslog:
|
||||
enabled: true
|
||||
pattern: '%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i'
|
||||
basedir: ''
|
||||
directory: ../logs/accessLog
|
||||
#basedir: ''
|
||||
spring:
|
||||
datasource:
|
||||
platform: postgresql
|
||||
|
@ -15,8 +16,10 @@ db:
|
|||
'0': ${MYSQL-PWD:123456}
|
||||
url:
|
||||
'0': jdbc:postgresql://${MYSQL-HOST:182.92.183.230}:${MYSQL-PORT:5432}/${MYSQL-DB:nacos}?tcpKeepAlive=true&reWriteBatchedInserts=true&ApplicationName=nacos_java
|
||||
#'0': jdbc:postgresql://${MYSQL-HOST:172.21.50.118}:${MYSQL-PORT:5432}/${MYSQL-DB:nacos}?tcpKeepAlive=true&reWriteBatchedInserts=true&ApplicationName=nacos_java
|
||||
user:
|
||||
'0': ${MYSQL-USER:temp}
|
||||
#'0': ${MYSQL-USER:postgres}
|
||||
pool:
|
||||
config:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
<!--定义日志文件的存储地址 -->
|
||||
<property name="LOG_HOME" value="../logs" />
|
||||
<property name="LOG_HOME" value="./logs/log" />
|
||||
|
||||
<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
|
||||
<!-- 控制台输出 -->
|
||||
|
@ -39,7 +39,7 @@
|
|||
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
<file>${LOG_HOME}/error-log.html</file>
|
||||
<file>${LOG_HOME}/error-log-%d{yyyy-MM-dd}.html</file>
|
||||
</appender>
|
||||
<!-- 生成 error html格式日志结束 -->
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
<!--定义日志文件的存储地址 -->
|
||||
<property name="LOG_HOME" value="../logs" />
|
||||
<property name="ERROR_LOG_HOME" value="../errorLogs" />
|
||||
<property name="LOG_HOME" value="./logs/log" />
|
||||
<property name="ERROR_LOG_HOME" value="./logs/errorLog" />
|
||||
|
||||
<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
|
||||
<!-- 控制台输出 -->
|
||||
|
@ -30,17 +30,23 @@
|
|||
</appender>
|
||||
|
||||
<!-- 生成 error html格式日志开始 -->
|
||||
<appender name="HTML" class="ch.qos.logback.core.FileAppender">
|
||||
<appender name="HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<!--设置日志级别,过滤掉info日志,只输入error日志-->
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${ERROR_LOG_HOME}/log-manage-error-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="ch.qos.logback.classic.html.HTMLLayout">
|
||||
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
<file>${ERROR_LOG_HOME}/log-manage-error.html</file>
|
||||
</appender>
|
||||
<!-- 生成 error html格式日志结束 -->
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
<!--定义日志文件的存储地址 -->
|
||||
<property name="LOG_HOME" value="../logs" />
|
||||
<property name="ERROR_LOG_HOME" value="../errorLogs" />
|
||||
<property name="LOG_HOME" value="./logs/log" />
|
||||
<property name="ERROR_LOG_HOME" value="./logs/errorLog" />
|
||||
|
||||
<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
|
||||
<!-- 控制台输出 -->
|
||||
|
@ -30,17 +30,23 @@
|
|||
</appender>
|
||||
|
||||
<!-- 生成 error html格式日志开始 -->
|
||||
<appender name="HTML" class="ch.qos.logback.core.FileAppender">
|
||||
<appender name="HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<!--设置日志级别,过滤掉info日志,只输入error日志-->
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${ERROR_LOG_HOME}/spectrum-analysis-error-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="ch.qos.logback.classic.html.HTMLLayout">
|
||||
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
<file>${ERROR_LOG_HOME}/spectrum-analysis-error.html</file>
|
||||
</appender>
|
||||
<!-- 生成 error html格式日志结束 -->
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
<!--定义日志文件的存储地址 -->
|
||||
<property name="LOG_HOME" value="../logs" />
|
||||
<property name="ERROR_LOG_HOME" value="../errorLogs" />
|
||||
<property name="LOG_HOME" value="./logs/log" />
|
||||
<property name="ERROR_LOG_HOME" value="./logs/errorLog" />
|
||||
|
||||
<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
|
||||
<!-- 控制台输出 -->
|
||||
|
@ -30,17 +30,23 @@
|
|||
</appender>
|
||||
|
||||
<!-- 生成 error html格式日志开始 -->
|
||||
<appender name="HTML" class="ch.qos.logback.core.FileAppender">
|
||||
<appender name="HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<!--设置日志级别,过滤掉info日志,只输入error日志-->
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${ERROR_LOG_HOME}/station-operation-error-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="ch.qos.logback.classic.html.HTMLLayout">
|
||||
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
<file>${ERROR_LOG_HOME}/station-operation-error.html</file>
|
||||
</appender>
|
||||
<!-- 生成 error html格式日志结束 -->
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
<!--定义日志文件的存储地址 -->
|
||||
<property name="LOG_HOME" value="../logs" />
|
||||
<property name="ERROR_LOG_HOME" value="../errorLogs" />
|
||||
<property name="LOG_HOME" value="./logs/log" />
|
||||
<property name="ERROR_LOG_HOME" value="./logs/errorLog" />
|
||||
|
||||
<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
|
||||
<!-- 控制台输出 -->
|
||||
|
@ -30,17 +30,23 @@
|
|||
</appender>
|
||||
|
||||
<!-- 生成 error html格式日志开始 -->
|
||||
<appender name="HTML" class="ch.qos.logback.core.FileAppender">
|
||||
<appender name="HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<!--设置日志级别,过滤掉info日志,只输入error日志-->
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${ERROR_LOG_HOME}/system-cloud-error-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="ch.qos.logback.classic.html.HTMLLayout">
|
||||
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
<file>${ERROR_LOG_HOME}/system-cloud-error.html</file>
|
||||
</appender>
|
||||
<!-- 生成 error html格式日志结束 -->
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
<!--定义日志文件的存储地址 -->
|
||||
<property name="LOG_HOME" value="../logs" />
|
||||
<property name="ERROR_LOG_HOME" value="../errorLogs" />
|
||||
<property name="LOG_HOME" value="./logs/log" />
|
||||
<property name="ERROR_LOG_HOME" value="./logs/errorLog" />
|
||||
|
||||
<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
|
||||
<!-- 控制台输出 -->
|
||||
|
@ -30,17 +30,23 @@
|
|||
</appender>
|
||||
|
||||
<!-- 生成 error html格式日志开始 -->
|
||||
<appender name="HTML" class="ch.qos.logback.core.FileAppender">
|
||||
<appender name="HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<!--设置日志级别,过滤掉info日志,只输入error日志-->
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${ERROR_LOG_HOME}/web-statistics-error-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="ch.qos.logback.classic.html.HTMLLayout">
|
||||
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
<file>${ERROR_LOG_HOME}/web-statistics-error.html</file>
|
||||
</appender>
|
||||
<!-- 生成 error html格式日志结束 -->
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user