aboutsummaryrefslogtreecommitdiff
path: root/src/lib/log/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/log/log.h')
-rw-r--r--src/lib/log/log.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/log/log.h b/src/lib/log/log.h
index 4291418eb6..da4bcbe608 100644
--- a/src/lib/log/log.h
+++ b/src/lib/log/log.h
@@ -297,4 +297,10 @@ MOCK_DECL(STATIC void, logv, (int severity, log_domain_mask_t domain,
va_list ap) CHECK_PRINTF(5,0));
#endif
+#if defined(LOG_PRIVATE) || defined(TOR_UNIT_TESTS)
+/** Given a severity, yields an index into log_severity_list_t.masks to use
+ * for that severity. */
+#define SEVERITY_MASK_IDX(sev) ((sev) - LOG_ERR)
+#endif
+
#endif /* !defined(TOR_TORLOG_H) */