aboutsummaryrefslogtreecommitdiff
path: root/src/tools/tor-resolve.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-03-05 22:31:39 +0000
committerNick Mathewson <nickm@torproject.org>2008-03-05 22:31:39 +0000
commitf56ba5f3d62cc6a50432466d7202733d909a1ca6 (patch)
tree9357d7b1860a492c10d435f6ab8c4208aa618e64 /src/tools/tor-resolve.c
parentd3589553bc7b091538ee93bd86867232b50b0f78 (diff)
downloadtor-f56ba5f3d62cc6a50432466d7202733d909a1ca6.tar.gz
tor-f56ba5f3d62cc6a50432466d7202733d909a1ca6.zip
r18630@catbus: nickm | 2008-03-05 17:31:33 -0500
Implement domain-selection for logging. Source is documented; needs documentation in manpage (maybe). For now, see doxygen comment on parse_log_severity_config in log.c svn:r13875
Diffstat (limited to 'src/tools/tor-resolve.c')
-rw-r--r--src/tools/tor-resolve.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c
index 4dee5e85ae..ab43719e62 100644
--- a/src/tools/tor-resolve.c
+++ b/src/tools/tor-resolve.c
@@ -280,6 +280,7 @@ main(int argc, char **argv)
uint32_t result = 0;
char *result_hostname = NULL;
char buf[INET_NTOA_BUF_LEN];
+ log_severity_list_t *s = tor_malloc_zero(sizeof(log_severity_list_t));
init_logging();
@@ -317,11 +318,15 @@ main(int argc, char **argv)
usage();
}
+ s->masks[SEVERITY_MASK_IDX(LOG_ERR)] = ~0u;
+ s->masks[SEVERITY_MASK_IDX(LOG_WARN)] = ~0u;
if (isVerbose) {
- add_stream_log(LOG_DEBUG, LOG_ERR, "<stderr>", stderr);
- } else {
- add_stream_log(LOG_WARN, 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 (n_args == 1) {
log_debug(LD_CONFIG, "defaulting to localhost:9050");
sockshost = 0x7f000001u; /* localhost */