aboutsummaryrefslogtreecommitdiff
path: root/src/common/torlog.h
diff options
context:
space:
mode:
authorChelsea Holland Komlo <me@chelseakomlo.com>2017-11-27 22:59:54 -0500
committerChelsea Holland Komlo <me@chelseakomlo.com>2017-12-21 15:29:33 -0500
commit3dfe8e6522460817100582a33a382be3c3efd988 (patch)
treebfb60d07ac6e4d66fded35794980dd268bc7f2eb /src/common/torlog.h
parent719db28f54ad1fa957999f2a6256e07bdb412e4f (diff)
downloadtor-3dfe8e6522460817100582a33a382be3c3efd988.tar.gz
tor-3dfe8e6522460817100582a33a382be3c3efd988.zip
add minimal rust module for logging to tor's logger
Allows an optional no-op for testing purposes
Diffstat (limited to 'src/common/torlog.h')
-rw-r--r--src/common/torlog.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/torlog.h b/src/common/torlog.h
index be8a39a1b9..0ed990b6ef 100644
--- a/src/common/torlog.h
+++ b/src/common/torlog.h
@@ -31,6 +31,16 @@
* "maximum severity" read "most severe" and "numerically *lowest* severity".
*/
+/** This defines log levels that are linked in the Rust log module, rather
+ * than re-defining these in both Rust and C.
+ *
+ * C_RUST_COUPLED src/rust/tor_log LogSeverity, LogDomain
+ */
+extern const int _LOG_WARN;
+extern const int _LOG_NOTICE;
+extern const log_domain_mask_t _LD_NET;
+extern const log_domain_mask_t _LD_GENERAL;
+
/** Debug-level severity: for hyper-verbose messages of no interest to
* anybody but developers. */
#define LOG_DEBUG 7