From eabd52462bfdb409121b351f198d535649d2b3b9 Mon Sep 17 00:00:00 2001 From: gramanas Date: Thu, 6 Dec 2018 09:23:52 +0200 Subject: Add log to file, fix list ckconf bug --- src/confparser.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/confparser.c') diff --git a/src/confparser.c b/src/confparser.c index f7b6268..fe1c19a 100644 --- a/src/confparser.c +++ b/src/confparser.c @@ -129,15 +129,20 @@ int config_file_parse(Conf *conf, UserOpt *opt) { return -1; } } - /* Could add an optional row that would make the config var - * optional. */ + /* Check if every non optional + * variable was read. */ #define X(var, str, name, optional) \ if (!optional && !conf->var) { \ ERR("Missing %s", name); \ return -1; \ } - CONFIG_VARIABLES_TABLE + CONFIG_VARIABLES_TABLE; #undef X + + /* Update ckerrlog logfile */ + if (conf->log_dir) { + errlog_make_logfile(conf->log_dir); + } return 0; } -- cgit v1.2.3