This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit db3bbc24372d16ef0e123843b561a77f95148790 Author: deardeng <565620...@qq.com> AuthorDate: Mon Mar 25 23:13:35 2024 +0800 [feature](merge-cloud) Change fe log rolling max size (#32777) --- .../src/main/java/org/apache/doris/common/Config.java | 4 ++++ .../main/java/org/apache/doris/common/Log4jConfig.java | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java index f307ea0336c..f5888b048fd 100644 --- a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java +++ b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java @@ -2600,6 +2600,10 @@ public class Config extends ConfigBase { // begin of cloud config //========================================================================== + @ConfField public static int info_sys_accumulated_file_size = 4; + @ConfField public static int warn_sys_accumulated_file_size = 2; + @ConfField public static int audit_sys_accumulated_file_size = 4; + @ConfField public static String cloud_unique_id = ""; diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/Log4jConfig.java b/fe/fe-core/src/main/java/org/apache/doris/common/Log4jConfig.java index 5178a2bcb8e..320cdd6114b 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/Log4jConfig.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/Log4jConfig.java @@ -60,7 +60,9 @@ public class Log4jConfig extends XmlConfiguration { + " <DefaultRolloverStrategy max=\"${sys_roll_num}\" fileIndex=\"max\">\n" + " <Delete basePath=\"${sys_log_dir}/\" maxDepth=\"1\">\n" + " <IfFileName glob=\"fe.log.*\" />\n" - + " <IfLastModified age=\"${sys_log_delete_age}\" />\n" + + " <IfAny>\n" + + " <IfAccumulatedFileSize exceeds=\"${info_sys_accumulated_file_size}GB\"/>\n" + + " </IfAny>\n" + " </Delete>\n" + " </DefaultRolloverStrategy>\n" + " </RollingFile>\n" @@ -75,7 +77,9 @@ public class Log4jConfig extends XmlConfiguration { + " <DefaultRolloverStrategy max=\"${sys_roll_num}\" fileIndex=\"max\">\n" + " <Delete basePath=\"${sys_log_dir}/\" maxDepth=\"1\">\n" + " <IfFileName glob=\"fe.warn.log.*\" />\n" - + " <IfLastModified age=\"${sys_log_delete_age}\" />\n" + + " <IfAny>\n" + + " <IfAccumulatedFileSize exceeds=\"${warn_sys_accumulated_file_size}GB\"/>\n" + + " </IfAny>\n" + " </Delete>\n" + " </DefaultRolloverStrategy>\n" + " </RollingFile>\n" @@ -90,7 +94,9 @@ public class Log4jConfig extends XmlConfiguration { + " <DefaultRolloverStrategy max=\"${audit_roll_num}\" fileIndex=\"max\">\n" + " <Delete basePath=\"${audit_log_dir}/\" maxDepth=\"1\">\n" + " <IfFileName glob=\"fe.audit.log.*\" />\n" - + " <IfLastModified age=\"${audit_log_delete_age}\" />\n" + + " <IfAny>\n" + + " <IfAccumulatedFileSize exceeds=\"${audit_sys_accumulated_file_size}GB\"/>\n" + + " </IfAny>\n" + " </Delete>\n" + " </DefaultRolloverStrategy>\n" + " </RollingFile>\n" @@ -218,6 +224,11 @@ public class Log4jConfig extends XmlConfiguration { properties.put("audit_roll_maxsize", auditRollMaxSize); properties.put("audit_roll_num", auditRollNum); properties.put("audit_log_delete_age", auditDeleteAge); + + properties.put("info_sys_accumulated_file_size", String.valueOf(Config.info_sys_accumulated_file_size)); + properties.put("warn_sys_accumulated_file_size", String.valueOf(Config.warn_sys_accumulated_file_size)); + properties.put("audit_sys_accumulated_file_size", String.valueOf(Config.audit_sys_accumulated_file_size)); + properties.put("include_location_flag", sysLogMode.equalsIgnoreCase("NORMAL") ? "true" : "false"); properties.put("immediate_flush_flag", sysLogMode.equalsIgnoreCase("ASYNC") ? "false" : "true"); properties.put("audit_file_postfix", compressAuditLog ? ".gz" : ""); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org