summaryrefslogtreecommitdiff
path: root/src/common/torlog.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-08-31 12:51:22 -0400
committerNick Mathewson <nickm@torproject.org>2016-08-31 12:51:22 -0400
commitf74916a98f97c7e80e46400e921d54466285d1fb (patch)
treedc1859cd46e31bdc36289f6b7a0f2207e90d6d2e /src/common/torlog.h
parent1f7dc823c5077101e4b0760ded1d7259d57d7506 (diff)
downloadtor-f74916a98f97c7e80e46400e921d54466285d1fb.tar.gz
tor-f74916a98f97c7e80e46400e921d54466285d1fb.zip
setup_capture_of_logs: no longer suppress log messages
Previously setup_capture_of_logs would prevent log messages from going to the console entirely. That's a problem, since sometimes log messages are bugs! Now setup_capture_of_logs() acts sensibly. If you really do need to keep a message from going to the console entirely, there is setup_full_capture_of_logs(). But only use that if you're prepared to make sure that there are no extraneous messages generated at all.
Diffstat (limited to 'src/common/torlog.h')
-rw-r--r--src/common/torlog.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/torlog.h b/src/common/torlog.h
index 80f37e0e48..6732a42741 100644
--- a/src/common/torlog.h
+++ b/src/common/torlog.h
@@ -109,6 +109,11 @@
* would. Used as a flag, not a log domain. */
#define LD_NOFUNCNAME (1u<<30)
+#ifdef TOR_UNIT_TESTS
+/** This log message should not be intercepted by mock_saving_logv */
+#define LD_NO_MOCK (1u<<29)
+#endif
+
/** Mask of zero or more log domains, OR'd together. */
typedef uint32_t log_domain_mask_t;