aboutsummaryrefslogtreecommitdiff
path: root/src/lib/log/log.h
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2019-10-03 19:13:57 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2019-10-03 19:13:57 +0300
commit9309eaf8ead0058aed6f1399b63fc8ae54cef799 (patch)
treeea542e3bd2f23ca0e72c605cc8e47fa9d74266d8 /src/lib/log/log.h
parent3778b97cabbf6f89694884c5f6b42dccb488df7f (diff)
parentdb329522ef6f0d0971111cbd07f35d54e0c7eced (diff)
downloadtor-9309eaf8ead0058aed6f1399b63fc8ae54cef799.tar.gz
tor-9309eaf8ead0058aed6f1399b63fc8ae54cef799.zip
Merge branch 'tor-github/pr/1377'
Diffstat (limited to 'src/lib/log/log.h')
-rw-r--r--src/lib/log/log.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/log/log.h b/src/lib/log/log.h
index 2abe752171..8e36012616 100644
--- a/src/lib/log/log.h
+++ b/src/lib/log/log.h
@@ -117,10 +117,21 @@
#define LD_BTRACK (UINT64_C(1)<<28)
/** Message-passing backend. */
#define LD_MESG (UINT64_C(1)<<29)
+
+/** The number of log domains. */
#define N_LOGGING_DOMAINS 30
+/** The highest log domain */
+#define HIGHEST_RESERVED_LD_DOMAIN_ (UINT64_C(1)<<(N_LOGGING_DOMAINS - 1))
+/** All log domains. */
+#define LD_ALL_DOMAINS ((~(UINT64_C(0)))>>(64 - N_LOGGING_DOMAINS))
+/** The number of log flags. */
+#define N_LOGGING_FLAGS 3
/** First bit that is reserved in log_domain_mask_t for non-domain flags. */
-#define LOWEST_RESERVED_LD_FLAG_ (UINT64_C(1)<<61)
+#define LOWEST_RESERVED_LD_FLAG_ (UINT64_C(1)<<(64 - N_LOGGING_FLAGS))
+/** All log flags. */
+#define LD_ALL_FLAGS ((~(UINT64_C(0)))<<(64 - N_LOGGING_FLAGS))
+
#ifdef TOR_UNIT_TESTS
/** This log message should not be intercepted by mock_saving_logv */
#define LD_NO_MOCK (UINT64_C(1)<<61)