This is an automated email from the ASF dual-hosted git repository.
jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git
The following commit(s) were added to refs/heads/master by this push:
new 006a24fb2 [Improvement] Use fileIndex="nomax" to avoid log loss.
(#3701)
006a24fb2 is described below
commit 006a24fb286c632a6fb41c12301c9393d28be997
Author: CatchYouIfICan <[email protected]>
AuthorDate: Thu Jul 31 15:24:32 2025 +0800
[Improvement] Use fileIndex="nomax" to avoid log loss. (#3701)
---
dist/src/main/amoro-bin/conf/log4j2.xml | 2 +-
dist/src/main/amoro-bin/conf/optimize/log4j2.xml | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dist/src/main/amoro-bin/conf/log4j2.xml
b/dist/src/main/amoro-bin/conf/log4j2.xml
index bb6e7a4e6..2ebe3ae2c 100644
--- a/dist/src/main/amoro-bin/conf/log4j2.xml
+++ b/dist/src/main/amoro-bin/conf/log4j2.xml
@@ -61,7 +61,7 @@
<!--Set the log base file size to trigger rolling log file
updates if the size is exceeded-->
<SizeBasedTriggeringPolicy size="2048MB"/>
</Policies>
- <DefaultRolloverStrategy max="7">
+ <DefaultRolloverStrategy fileIndex="nomax">
<Delete basePath="${LOG_HOME}/history" maxDepth="1">
<IfFileName glob="*.log.gz"/>
<IfAny>
diff --git a/dist/src/main/amoro-bin/conf/optimize/log4j2.xml
b/dist/src/main/amoro-bin/conf/optimize/log4j2.xml
index 8ce176996..f4f47b7d3 100644
--- a/dist/src/main/amoro-bin/conf/optimize/log4j2.xml
+++ b/dist/src/main/amoro-bin/conf/optimize/log4j2.xml
@@ -62,9 +62,10 @@
<!--Set the time for rolling updates of log files, depending
on the file naming filePattern setting-->
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
</Policies>
- <!--Set the maximum number of files in the log, the default is 7
if not set, it will be overwritten when
- it exceeds the size; depends on %i in filePattern-->
- <DefaultRolloverStrategy max="7">
+ <!--As of release 2.8, if the fileIndex attribute is set to
"nomax" then the min and max values will be
+ ignored and file numbering will increment by 1 and each rollover
will have an incrementally higher value
+ with no maximum number of files.-->
+ <DefaultRolloverStrategy fileIndex="nomax">
<Delete basePath="${LOG_DIR}/history" maxDepth="1">
<IfFileName glob="*.log"/>
<IfLastModified age="7d"/>