summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-01-25 15:53:15 -0500
committerNick Mathewson <nickm@torproject.org>2011-01-25 15:53:15 -0500
commit89ee779f928af4ad31ad6d45936c6a386e263584 (patch)
tree6373563d9ee8ef7d47c4a4ccff57f619c16d18b1 /src/or/config.c
parente261a1a3e6513eeafa1b53b83ebfec7f5d834a39 (diff)
downloadtor-89ee779f928af4ad31ad6d45936c6a386e263584.tar.gz
tor-89ee779f928af4ad31ad6d45936c6a386e263584.zip
Add a torrc option to report log domains
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 8c1205de47..5600ac5167 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -287,6 +287,7 @@ static config_var_t _option_vars[] = {
OBSOLETE("IgnoreVersion"),
V(KeepalivePeriod, INTERVAL, "5 minutes"),
VAR("Log", LINELIST, Logs, NULL),
+ V(LogMessageDomains, BOOL, "0"),
OBSOLETE("LinkPadding"),
OBSOLETE("LogLevel"),
OBSOLETE("LogFile"),
@@ -3811,7 +3812,8 @@ options_transition_affects_workers(or_options_t *old_options,
old_options->SafeLogging != new_options->SafeLogging ||
old_options->ClientOnly != new_options->ClientOnly ||
public_server_mode(old_options) != public_server_mode(new_options) ||
- !config_lines_eq(old_options->Logs, new_options->Logs))
+ !config_lines_eq(old_options->Logs, new_options->Logs) ||
+ old_options->LogMessageDomains != new_options->LogMessageDomains)
return 1;
/* Check whether log options match. */
@@ -4387,6 +4389,9 @@ options_init_logs(or_options_t *options, int validate_only)
}
smartlist_free(elts);
+ if (ok && !validate_only)
+ logs_set_domain_logging(options->LogMessageDomains);
+
return ok?0:-1;
}