Tor  0.4.7.0-alpha-dev
trace.h
Go to the documentation of this file.
1 /* Copyright (c) 2020-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
3 
4 /**
5  * \file trace.h
6  * \brief Header for trace.c
7  **/
8 
9 #ifndef TOR_LIB_TRACE_TRACE_H
10 #define TOR_LIB_TRACE_TRACE_H
11 
12 #include "orconfig.h"
13 
14 void tor_trace_init(void);
15 void tor_trace_free_all(void);
16 
17 #ifdef HAVE_TRACING
18 
19 #include "lib/log/log.h"
20 
21 static inline void
22 tracing_log_warning(void)
23 {
24  log_warn(LD_GENERAL,
25  "Tracing capabilities have been built in. If this is NOT on "
26  "purpose, your tor is NOT safe to run.");
27 }
28 
29 #else /* !defined(HAVE_TRACING) */
30 
31 /* NOP it. */
32 #define tracing_log_warning()
33 
34 #endif /* defined(HAVE_TRACING) */
35 
36 #endif /* !defined(TOR_LIB_TRACE_TRACE_H) */
Headers for log.c.
#define LD_GENERAL
Definition: log.h:62
void tor_trace_free_all(void)
Definition: trace.c:21
void tor_trace_init(void)
Definition: trace.c:15