的OnStartupTriggeringPolicy上增加文件索

的OnStartupTriggeringPolicy上增加文件索

While rotating the file on OnStartupTriggeringPolicy in log4j2, 7 times the files is getting created with indexing 1,2,3 to 7 as shown below. After that it is over writing to the first one.packs-03-29-2017-1.zippacks-03-29-2017-2.zippacks-03-29-2017-3.zippacks-03-29-2017-4.zippacks-03-29-2017-5.zippacks-03-29-2017-6.zippacks-03-29-2017-7.zipCan someone tell me how to increase the number of file indexing in log4j2. 解决方案 Assuming that you're using the DefaultRolloverStrategy you can simply increase your "max" to the desired value within your configuration file.See also:Log4j2 Manual: Rollover Strategies 这篇关于在log4j2中的OnStartupTriggeringPolicy上增加文件索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-29 19:37