基于mall4j产品的二开项目后端
lee
2024-12-18 921461a3f906d74403aeb6a27051deb77eca10fc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<configuration scan="true" scanPeriod="60 seconds" debug="false">
    <property name="PROJECT_PATH" value="/opt/projects/yami-b2b2c"/>
    <property name="LOG_FILE_MAX_HISTORY" value="30"/>
    <property name="LOG_FILE_MAX_SIZE" value="50MB"/>
 
 
    <include resource="org/springframework/boot/logging/logback/defaults.xml" />
    <include resource="org/springframework/boot/logging/logback/console-appender.xml" />
 
    <appender name="DefaultFile"
              class="ch.qos.logback.core.rolling.RollingFileAppender">
        <append>true</append>
        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
            <pattern>${FILE_LOG_PATTERN}</pattern>
            <charset>UTF-8</charset>
        </encoder>
        <file>${PROJECT_PATH}/log/api.log</file>
 
        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
            <level>${logging.level}</level>
        </filter>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${PROJECT_PATH}/log/api/%d{yyyy-MM}/api-%d{yyyy-MM-dd}-%i.log.gz</fileNamePattern>
            <maxFileSize>${LOG_FILE_MAX_SIZE}</maxFileSize>
            <maxHistory>${LOG_FILE_MAX_HISTORY}</maxHistory>
        </rollingPolicy>
    </appender>
 
    <root level="info">
        <appender-ref ref="CONSOLE" />
        <appender-ref ref="DefaultFile" />
    </root>
 
    <logger name="com.yami.shop" level="debug"/>
    <logger name="springfox.documentation.swagger2" level="off"/>
    <logger name="io.swagger.models.parameters" level="off"/>
    <logger name="springfox.documentation.swagger.readers.operation.OperationImplicitParameterReader" level="off"/>
    <logger name="springfox.documentation.spring.web.readers.operation" level="off"/>
</configuration>