diff --git a/smallapp/unbound-host.c b/smallapp/unbound-host.c index 470fd7eac..d46c753fb 100644 --- a/smallapp/unbound-host.c +++ b/smallapp/unbound-host.c @@ -440,7 +440,6 @@ int main(int argc, char* argv[]) debuglevel++; if(debuglevel < 2) debuglevel = 2; /* at least VERB_DETAIL */ - check_ub_res(ub_ctx_debuglevel(ctx, debuglevel)); break; case 'r': check_ub_res(ub_ctx_resolvconf(ctx, "/etc/resolv.conf")); @@ -466,6 +465,8 @@ int main(int argc, char* argv[]) usage(); } } + if(debuglevel != 0) /* set after possible -C options */ + check_ub_res(ub_ctx_debuglevel(ctx, debuglevel)); argc -= optind; argv += optind; if(argc != 1)