diff options
| author | wangchengcheng <[email protected]> | 2023-07-27 15:43:51 +0800 |
|---|---|---|
| committer | wangchengcheng <[email protected]> | 2023-07-27 15:43:51 +0800 |
| commit | 124f687daace8b85e5c74abac04bcd0a92744a8d (patch) | |
| tree | 4f563326b1be67cfb51bf6a04f1ca4d953536e76 /MPE/galaxy-report-service/config/log4j2-dev.xml | |
| parent | 08686ae87f9efe7a590f48db74ed133b481c85b1 (diff) | |
P19 23.07 online-configP19
Diffstat (limited to 'MPE/galaxy-report-service/config/log4j2-dev.xml')
| -rw-r--r-- | MPE/galaxy-report-service/config/log4j2-dev.xml | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/MPE/galaxy-report-service/config/log4j2-dev.xml b/MPE/galaxy-report-service/config/log4j2-dev.xml new file mode 100644 index 0000000..dea8fd7 --- /dev/null +++ b/MPE/galaxy-report-service/config/log4j2-dev.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration> + + <!--日志打印相关参数配置--> + <Properties> + <!--每5M压缩日志文件--> + <property name="LOG_SIZE">200M</property> + <!--最多产生10个压缩文件--> + <property name="LOG_NUMS">10</property> + <!--日志打印等级--> + <property name="LOG_LEVEL">info</property> + <!--日志文件路径--> + <property name="LOG_PATH">logs</property> + <!--日志文件名称--> + <property name="LOG_FILE_NAME">galaxy-report-service</property> + <!--日志打印格式--> + <property name="LOG_PATTERN">[%d{yyyy-MM-dd HH:mm:ssZ}{UTC}] [%p] [Thread:%t] %l %x - %m%n</property> + </Properties> + + <appenders> + <!-- <Console name="consoleSystemOutAppender" target="SYSTEM_OUT"> + <ThresholdFilter level="DEBUG" onMatch="ACCEPT" onMismatch="DENY"/> + <PatternLayout pattern="${LOG_PATTERN}"/> + </Console> + --> + <RollingFile name="rollingFileAllAppender" + fileName="${LOG_PATH}/${LOG_FILE_NAME}.log" + filePattern="${LOG_PATH}/history/$${date:yyyy-MM-dd}/${LOG_FILE_NAME}-%d{yyyy-MM-dd}-%i.log.gz"> + <PatternLayout pattern="${LOG_PATTERN}"/> + <Policies> + <SizeBasedTriggeringPolicy size="${LOG_SIZE}"/> + <TimeBasedTriggeringPolicy interval="1" modulate="true"/> + </Policies> + <Filters> + <ThresholdFilter level="all" onMatch="ACCEPT" onMismatch="DENY"/> + </Filters> + <DefaultRolloverStrategy max="${LOG_NUMS}"> + <Delete basePath="${LOG_PATH}/history" maxDepth="1"> + <IfFileName glob="*.log.gz"> + <IfLastModified age="30d"> + <IfAny> + <IfAccumulatedFileSize exceeds="10 GB" /> + </IfAny> + </IfLastModified> + </IfFileName> + </Delete> + </DefaultRolloverStrategy> + </RollingFile> + </appenders> + <loggers> + <root level="${LOG_LEVEL}"> + <!-- <appender-ref ref="consoleSystemOutAppender"/> --> + <appender-ref ref="rollingFileAllAppender"/> + </root> + </loggers> +</configuration> |
