log4j中报错详解
warn: Posix file attribute permissions defined but it is not supported by this files system.
log4j2.xml有下面配置
<RollingFile name="RollingFileInfo" filePermissions="rw-r--r--"
fileName="/var/log/springboot/spring-boot-start0.log"
filePattern="/var/log/springboot/spring-boot-start0-%d{yyyy-MM-dd}-%i.log">
<Filters>
<ThresholdFilter level="INFO" />
</Filters>
<PatternLayout charset="UTF-8" pattern="[%d{HH:mm:ss:SSS}] [%p] - %l - %m%n" />
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="100M"/>
</Policies>
</RollingFile>
这是由于win系统不支持“filePermissions”所致,但最终会跑在linux上,顾上面的warning可以忽略。