sync_log_buff_interval support time unit as 5m for 5 minutes

master
YuQing 2026-09-04 11:15:01 +08:00
parent 5708f3f8d2
commit 7237e50f6d
2 changed files with 3 additions and 3 deletions

View File

@ -161,9 +161,9 @@ int sf_load_log_config(IniFullContext *ini_ctx, LogContext *log_ctx,
{ {
int result; 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->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) { if (log_cfg->sync_log_buff_interval <= 0) {
log_cfg->sync_log_buff_interval = SF_DEF_SYNC_LOG_BUFF_INTERVAL; log_cfg->sync_log_buff_interval = SF_DEF_SYNC_LOG_BUFF_INTERVAL;
} }

View File

@ -95,7 +95,7 @@ int sf_printbuffer(char* buffer,int32_t len)
void sf_usage_ex(const char *program, const SFCMDOption *other_options) void sf_usage_ex(const char *program, const SFCMDOption *other_options)
{ {
fprintf(stderr, "\nUsage: %s [options] <config_file> " fprintf(stderr, "\nUsage: %s [options] <config_file> "
"[start | stop | restart | status]\n\noptions:\n", program); "[start | stop | restart | status]\n\nOptions:\n", program);
if (other_options != NULL) { if (other_options != NULL) {
const SFCMDOption *option; const SFCMDOption *option;