diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/tor-gencert.c | 11 | ||||
-rw-r--r-- | src/tools/tor-resolve.c | 11 |
2 files changed, 8 insertions, 14 deletions
diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c index 1f4b2c5e59..da037d3208 100644 --- a/src/tools/tor-gencert.c +++ b/src/tools/tor-gencert.c @@ -190,13 +190,10 @@ parse_commandline(int argc, char **argv) } s = tor_malloc_zero(sizeof(log_severity_list_t)); - s->masks[SEVERITY_MASK_IDX(LOG_ERR)] = ~0u; - s->masks[SEVERITY_MASK_IDX(LOG_WARN)] = ~0u; - if (verbose) { - s->masks[SEVERITY_MASK_IDX(LOG_NOTICE)] = ~0u; - s->masks[SEVERITY_MASK_IDX(LOG_INFO)] = ~0u; - s->masks[SEVERITY_MASK_IDX(LOG_DEBUG)] = ~0u; - } + if (verbose) + set_log_severity_config(LOG_DEBUG, LOG_ERR, s); + else + set_log_severity_config(LOG_WARN, LOG_ERR, s); add_stream_log(s, "<stderr>", stderr); if (!identity_key_file) { diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c index ab43719e62..fb4f13ff45 100644 --- a/src/tools/tor-resolve.c +++ b/src/tools/tor-resolve.c @@ -318,13 +318,10 @@ main(int argc, char **argv) usage(); } - s->masks[SEVERITY_MASK_IDX(LOG_ERR)] = ~0u; - s->masks[SEVERITY_MASK_IDX(LOG_WARN)] = ~0u; - if (isVerbose) { - s->masks[SEVERITY_MASK_IDX(LOG_NOTICE)] = ~0u; - s->masks[SEVERITY_MASK_IDX(LOG_INFO)] = ~0u; - s->masks[SEVERITY_MASK_IDX(LOG_DEBUG)] = ~0u; - } + if (isVerbose) + set_log_severity_config(LOG_DEBUG, LOG_ERR, s); + else + set_log_severity_config(LOG_WARN, LOG_ERR, s); add_stream_log(s, "<stderr>", stderr); if (n_args == 1) { |