mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-01 03:09:28 -05:00
parent
e860d39f54
commit
21f740d313
3 changed files with 5 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
1 August 2019: Wouter
|
||||
- For #52 #53, second context does not close logfile override.
|
||||
- Fix #52 #53, fix for example fail program.
|
||||
|
||||
29 July 2019: Wouter
|
||||
- Add verbose log message when auth zone file is written, at level 4.
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ context_finalize(struct ub_ctx* ctx)
|
|||
{
|
||||
struct config_file* cfg = ctx->env->cfg;
|
||||
verbosity = cfg->verbosity;
|
||||
if(ctx_logfile_overridden) {
|
||||
if(ctx_logfile_overridden && !ctx->logfile_override) {
|
||||
log_file(NULL); /* clear that override */
|
||||
ctx_logfile_overridden = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,8 @@ static struct ub_ctx* ub_ctx_create_nopipe(void)
|
|||
#endif
|
||||
|
||||
checklock_start();
|
||||
log_init(NULL, 0, NULL); /* logs to stderr */
|
||||
if(!ctx_logfile_overridden)
|
||||
log_init(NULL, 0, NULL); /* logs to stderr */
|
||||
log_ident_set("libunbound");
|
||||
#ifdef USE_WINSOCK
|
||||
if((r = WSAStartup(MAKEWORD(2,2), &wsa_data)) != 0) {
|
||||
|
|
@ -476,6 +477,7 @@ int ub_ctx_debugout(struct ub_ctx* ctx, void* out)
|
|||
{
|
||||
lock_basic_lock(&ctx->cfglock);
|
||||
log_file((FILE*)out);
|
||||
ctx_logfile_overridden = 1;
|
||||
ctx->logfile_override = 1;
|
||||
ctx->log_out = out;
|
||||
lock_basic_unlock(&ctx->cfglock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue