From 2b41b857bdabffeafbbf748189b22cd6ee818394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=C3=A6r=C3=B8y?= Date: Mon, 10 Sep 2018 15:15:45 +0200 Subject: [PATCH] Add LD_PROCESS as log domain. See: https://bugs.torproject.org/28179 --- doc/tor.1.txt | 3 ++- src/lib/log/log.c | 2 +- src/lib/log/log.h | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/tor.1.txt b/doc/tor.1.txt index e94382b66b..42fe8f1bcc 100644 --- a/doc/tor.1.txt +++ b/doc/tor.1.txt @@ -669,7 +669,8 @@ GENERAL OPTIONS + The currently recognized domains are: general, crypto, net, config, fs, protocol, mm, http, app, control, circ, rend, bug, dir, dirserv, or, edge, - acct, hist, handshake, heartbeat, channel, sched, guard, consdiff, and dos. + acct, hist, handshake, heartbeat, channel, sched, guard, consdiff, dos, and + process. Domain names are case-insensitive. + + For example, "`Log [handshake]debug [~net,~mm]info notice stdout`" sends diff --git a/src/lib/log/log.c b/src/lib/log/log.c index 46107fe848..861de6e963 100644 --- a/src/lib/log/log.c +++ b/src/lib/log/log.c @@ -1268,7 +1268,7 @@ static const char *domain_list[] = { "GENERAL", "CRYPTO", "NET", "CONFIG", "FS", "PROTOCOL", "MM", "HTTP", "APP", "CONTROL", "CIRC", "REND", "BUG", "DIR", "DIRSERV", "OR", "EDGE", "ACCT", "HIST", "HANDSHAKE", "HEARTBEAT", "CHANNEL", - "SCHED", "GUARD", "CONSDIFF", "DOS", NULL + "SCHED", "GUARD", "CONSDIFF", "DOS", "PROCESS", NULL }; /** Return a bitmask for the log domain for which domain is the name, diff --git a/src/lib/log/log.h b/src/lib/log/log.h index 493409756f..1cd6087eb8 100644 --- a/src/lib/log/log.h +++ b/src/lib/log/log.h @@ -107,8 +107,10 @@ #define LD_CONSDIFF (1u<<24) /** Denial of Service mitigation. */ #define LD_DOS (1u<<25) +/** Processes */ +#define LD_PROCESS (1u<<26) /** Number of logging domains in the code. */ -#define N_LOGGING_DOMAINS 26 +#define N_LOGGING_DOMAINS 27 /** This log message is not safe to send to a callback-based logger * immediately. Used as a flag, not a log domain. */