mirror of https://github.com/yandex/odyssey.git
odissey: parse stats_period config parameter
This commit is contained in:
parent
142a1adff8
commit
e7e008d710
|
@ -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)
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue