<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Properties>
<Property name="logPath">/opt/logs/accounting</Property>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
<RollingFile name="FILE" fileName="${logPath}/accounting.log" filePattern="${logPath}/accounting-%d{yyyy-MM-dd-HH}.log">
<PatternLayout pattern="%date %5level [%thread] (%file:%line) - %m%n"/>
<Policies>
<TimeBasedTriggeringPolicy/>
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<logger name="com.ftvalue.accounting" level="info" />
<Root level="INFO">
<AppenderRef ref="Console"/>
<AppenderRef ref="FILE"/>
</Root>
</Loggers>
</Configuration>
Spring-Boot Log4j配置文件
最新推荐文章于 2024-06-13 11:42:37 发布