mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
log: Move SEVERITY_MASK_IDX() to log.h
Move SEVERITY_MASK_IDX() to log.h private/unit tests section, so that we can use it in log.c, the unit tests, and the fuzzers. (The test and fuzzer code changes are in a subsequent commit.) Preparation for bug 31334.
This commit is contained in:
parent
e1429d9148
commit
1ad1e84b17
@ -55,10 +55,6 @@
|
||||
#include <android/log.h>
|
||||
#endif // HAVE_ANDROID_LOG_H.
|
||||
|
||||
/** 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)
|
||||
|
||||
/** @{ */
|
||||
/** The string we stick at the end of a log message when it is too long,
|
||||
* and its length. */
|
||||
|
@ -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) */
|
||||
|
Loading…
Reference in New Issue
Block a user