diff --git a/core/od_config.c b/core/od_config.c index 3e18374f..b0808e78 100644 --- a/core/od_config.c +++ b/core/od_config.c @@ -597,6 +597,12 @@ od_configparse(od_config_t *config) return -1; config->scheme->syslog_facility = tk->v.string; continue; + /* stats_period */ + case OD_LSTATS_PERIOD: + if (od_confignext(config, OD_LNUMBER, &tk) == -1) + return -1; + config->scheme->stats_period = rc; + continue; /* pooling */ case OD_LPOOLING: if (od_confignext(config, OD_LSTRING, &tk) == -1) diff --git a/core/od_scheme.c b/core/od_scheme.c index ba53ddeb..132a2448 100644 --- a/core/od_scheme.c +++ b/core/od_scheme.c @@ -29,6 +29,7 @@ void od_schemeinit(od_scheme_t *scheme) scheme->syslog = 0; scheme->syslog_ident = NULL; scheme->syslog_facility = NULL; + scheme->stats_period = 0; scheme->host = NULL; scheme->port = 6432; scheme->backlog = 128; @@ -314,6 +315,8 @@ void od_schemeprint(od_scheme_t *scheme, od_log_t *log) od_log(log, NULL, "syslog_ident '%s'", scheme->syslog_ident); if (scheme->syslog_facility) od_log(log, NULL, "syslog_facility '%s'", scheme->syslog_facility); + if (scheme->stats_period) + od_log(log, NULL, "stats_period %d", scheme->stats_period); if (scheme->daemonize) od_log(log, NULL, "daemonize %s", scheme->daemonize ? "yes" : "no"); diff --git a/core/od_scheme.h b/core/od_scheme.h index 088d0af0..112cdcbc 100644 --- a/core/od_scheme.h +++ b/core/od_scheme.h @@ -81,6 +81,7 @@ struct od_scheme_t { int syslog; char *syslog_ident; char *syslog_facility; + int stats_period; char *pooling; od_pooling_t pooling_mode; /* listen */