SpringBoot + log4j2日志配置

配置示例

application.properties

logging.config=classpath:log4j2-spring.xml

log4j2-spring.xml


<Configuration status="INFO">
    <Appenders>
        <RollingFile name="RollingFileInfo" fileName="/data/logs/server/server.log"
                     filePattern="/data/logs/server/server-%d{yyyy-MM-dd}-%i.log"

你可能感兴趣的:(springboot,spring,boot,java,后端)