Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2535,6 +2535,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 = "";

Expand Down
17 changes: 14 additions & 3 deletions fe/fe-core/src/main/java/org/apache/doris/common/Log4jConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,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"
Expand All @@ -74,7 +76,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"
Expand All @@ -89,7 +93,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"
Expand Down Expand Up @@ -215,6 +221,11 @@ private static void reconfig() throws IOException {
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" : "");
Expand Down