这是我的log4j2配置
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<RollingFile name="RollingFileAppender" fileName="logs/app.log"
filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz" immediateFlush="false">
<PatternLayout>
<Pattern>%d [%t] %highlight{%level}{FATAL=bg_red, ERROR=red, WARN=yellow, INFO=green, DEBUG=blue} %msg%n</Pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy />
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="RollingFileAppender"/>
</Root>
</Loggers>
</Configuration>
我收到一个错误消息,说打开的文件太多。
2018-06-28 14:46:54,014线程-0错误处理Appender RollingFileAppender org.apache.logging.log4j.LoggingException时发生异常:读取文件夹日志/ 2018-06日志/ 2018-06时出错:打开太多文件