首页 > 解决方案 > 如何使用 log4j 在 Spring Boot 中创建最近 5 天的记录器 zip 文件?

问题描述

我遵循此示例,但此示例使用 xml 文件。我想使用属性文件。

https://examples.javacodegeeks.com/enterprise-java/logback/logback-rollingfileappender-example/

标签: java

解决方案


请参阅下面的链接,了解如何使用 YAML/JSON/Properties 等不同选项进行配置

https://logging.apache.org/log4j/2.x/manual/configuration.html

具体属性:

https://springframework.guru/log4j-2-configuration-using-properties-file/


推荐阅读