From 7237e50f6d263ef8dff88a9aa30a34bfc4fee99c Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Fri, 4 Sep 2026 11:15:01 +0800 Subject: [PATCH] sync_log_buff_interval support time unit as 5m for 5 minutes --- src/sf_global.c | 4 ++-- src/sf_util.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sf_global.c b/src/sf_global.c index 6fd639e..ada5ef2 100644 --- a/src/sf_global.c +++ b/src/sf_global.c @@ -161,9 +161,9 @@ int sf_load_log_config(IniFullContext *ini_ctx, LogContext *log_ctx, { int result; - log_cfg->sync_log_buff_interval = iniGetIntValueEx( + log_cfg->sync_log_buff_interval = iniGetTimestampValueEx( ini_ctx->section_name, "sync_log_buff_interval", - ini_ctx->context, SF_DEF_SYNC_LOG_BUFF_INTERVAL, true); + ini_ctx->context, SF_DEF_SYNC_LOG_BUFF_INTERVAL, 1, true); if (log_cfg->sync_log_buff_interval <= 0) { log_cfg->sync_log_buff_interval = SF_DEF_SYNC_LOG_BUFF_INTERVAL; } diff --git a/src/sf_util.c b/src/sf_util.c index 59cc162..8fea71a 100644 --- a/src/sf_util.c +++ b/src/sf_util.c @@ -95,7 +95,7 @@ int sf_printbuffer(char* buffer,int32_t len) void sf_usage_ex(const char *program, const SFCMDOption *other_options) { fprintf(stderr, "\nUsage: %s [options] " - "[start | stop | restart | status]\n\noptions:\n", program); + "[start | stop | restart | status]\n\nOptions:\n", program); if (other_options != NULL) { const SFCMDOption *option;