From e261a1a3e6513eeafa1b53b83ebfec7f5d834a39 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 25 Jan 2011 15:03:36 -0500 Subject: Simplify syntax for negated log domains Previously if you wanted to say "All messages except network messages", you needed to say "[*,~net]" and if you said "[~net]" by mistake, you would get no messages at all. Now, if you say "[~net]", you get everything except networking messages. --- src/common/log.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/common/log.c') 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; -- cgit v1.2.3-54-g00ecf