summaryrefslogtreecommitdiff
path: root/src/common/torlog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/torlog.h')
-rw-r--r--src/common/torlog.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/common/torlog.h b/src/common/torlog.h
index cadfe3b879..ac632ff521 100644
--- a/src/common/torlog.h
+++ b/src/common/torlog.h
@@ -191,6 +191,10 @@ void log_fn_ratelim_(struct ratelim_t *ratelim, int severity,
const char *format, ...)
CHECK_PRINTF(5,6);
+int log_message_is_interesting(int severity, log_domain_mask_t domain);
+void tor_log_string(int severity, log_domain_mask_t domain,
+ const char *function, const char *string);
+
#if defined(__GNUC__) && __GNUC__ <= 3
/* These are the GCC varidaic macros, so that older versions of GCC don't
@@ -248,6 +252,16 @@ void log_fn_ratelim_(struct ratelim_t *ratelim, int severity,
args, ##__VA_ARGS__)
#endif /* defined(__GNUC__) && __GNUC__ <= 3 */
+/** 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_;
+
#ifdef LOG_PRIVATE
MOCK_DECL(STATIC void, logv, (int severity, log_domain_mask_t domain,
const char *funcname, const char *suffix, const char *format,