aboutsummaryrefslogtreecommitdiff
path: root/src/tools/tor-gencert.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/tor-gencert.c')
-rw-r--r--src/tools/tor-gencert.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c
index c6ba8dba8f..2912668240 100644
--- a/src/tools/tor-gencert.c
+++ b/src/tools/tor-gencert.c
@@ -123,6 +123,7 @@ static int
parse_commandline(int argc, char **argv)
{
int i;
+ log_severity_list_t *s;
for (i = 1; i < argc; ++i) {
if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h")) {
show_help();
@@ -188,11 +189,15 @@ 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) {
- add_stream_log(LOG_INFO, LOG_ERR, "<stderr>", stderr);
- } else {
- add_stream_log(LOG_NOTICE, LOG_ERR, "<stderr>", stderr);
+ s->masks[SEVERITY_MASK_IDX(LOG_NOTICE)] = ~0u;
+ s->masks[SEVERITY_MASK_IDX(LOG_INFO)] = ~0u;
+ s->masks[SEVERITY_MASK_IDX(LOG_DEBUG)] = ~0u;
}
+ add_stream_log(s, "<stderr>", stderr);
if (!identity_key_file) {
identity_key_file = tor_strdup("./authority_identity_key");