diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-03-13 22:18:38 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-03-13 22:18:38 +0000 |
commit | 46155aca171796396449a55aa24888a9a7372ed6 (patch) | |
tree | 2499f5c7064bd7ddb03695a24e03c6b28304f177 /src/tools/tor-gencert.c | |
parent | d928e5685f1170d907a47ee95e35c9b92c28adef (diff) | |
download | tor-46155aca171796396449a55aa24888a9a7372ed6.tar.gz tor-46155aca171796396449a55aa24888a9a7372ed6.zip |
r18804@catbus: nickm | 2008-03-13 18:18:31 -0400
Refactor log domain mask code so that nobody outside of log.c has to use SEVERITY_MASK_IDX. It is error-prone.
svn:r14016
Diffstat (limited to 'src/tools/tor-gencert.c')
-rw-r--r-- | src/tools/tor-gencert.c | 11 |
1 files changed, 4 insertions, 7 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) { |