summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/log_domains6
-rw-r--r--doc/tor.1.txt2
-rw-r--r--src/common/log.c5
3 files changed, 10 insertions, 3 deletions
diff --git a/changes/log_domains b/changes/log_domains
index f4cfe6f4d2..939b9a9e74 100644
--- a/changes/log_domains
+++ b/changes/log_domains
@@ -1,5 +1,9 @@
- o Documentation
+ o Minor features
+ - Make it simpler to specify "All log domains except for A and B".
+ Previously you needed to say "[*,~A,~B]". Now you can just say
+ "[~A,~B]".
+ o Documentation
- Add documentation for configuring logging at different severities in
different log domains. We've had this feature since 0.2.1.1-alpha, but
for some reason it never made it into the manpage. Fixes bug 2215.
diff --git a/doc/tor.1.txt b/doc/tor.1.txt
index 9a7ee07e70..17cdf37ac0 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -341,7 +341,7 @@ Other options can be specified either on the command-line (--option
protocol, mm, http, app, control, circ, rend, bug, dir, dirserv, or, edge,
acct, hist, and handshake. Domain names are case-insensitive. +
+
- For example, "`Log [handshake]debug [*,~net,~mm]info notice stdout`" sends
+ For example, "`Log [handshake]debug [~net,~mm]info notice stdout`" sends
to stdout: all handshake messages of any severity, all info-and-higher
messages from domains other than networking and memory management, and all
messages of severity notice or higher.
diff --git a/src/common/log.c b/src/common/log.c
index 2fef2cc5d9..28fca4eaca 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -919,7 +919,10 @@ parse_log_severity_config(const char **cfg_ptr,
smartlist_free(domains_list);
if (err)
return -1;
- domains &= ~neg_domains;
+ if (domains == 0 && neg_domains)
+ domains = ~neg_domains;
+ else
+ domains &= ~neg_domains;
cfg = eat_whitespace(closebracket+1);
} else {
++got_an_unqualified_range;