diff options
author | Cy Schubert <cy@FreeBSD.org> | 2019-12-28 05:27:06 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2019-12-28 05:27:06 +0000 |
commit | e2fe726866d062155f6b1aae749375475ef19191 (patch) | |
tree | fe6b00611d5c987d2c12c32063891ae19295ffeb /libunbound/context.c | |
parent | 366b94c4a9552acfb560d3234aea0955ebc1eb8e (diff) |
Diffstat (limited to 'libunbound/context.c')
-rw-r--r-- | libunbound/context.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libunbound/context.c b/libunbound/context.c index 20e3680ec3bca..b8fe87d2e580d 100644 --- a/libunbound/context.c +++ b/libunbound/context.c @@ -57,9 +57,16 @@ context_finalize(struct ub_ctx* ctx) { struct config_file* cfg = ctx->env->cfg; verbosity = cfg->verbosity; - if(ctx->logfile_override) + if(ctx_logfile_overridden && !ctx->logfile_override) { + log_file(NULL); /* clear that override */ + ctx_logfile_overridden = 0; + } + if(ctx->logfile_override) { + ctx_logfile_overridden = 1; log_file(ctx->log_out); - else log_init(cfg->logfile, cfg->use_syslog, NULL); + } else { + log_init(cfg->logfile, cfg->use_syslog, NULL); + } config_apply(cfg); if(!modstack_setup(&ctx->mods, cfg->module_conf, ctx->env)) return UB_INITFAIL; |