aboutsummaryrefslogtreecommitdiff
path: root/src/lib/trace/trace.h
blob: b94600a383d3d52f7948481516a7dbb28dfee8bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* Copyright (c) 2020-2021, The Tor Project, Inc. */
/* See LICENSE for licensing information */

/**
 * \file trace.h
 * \brief Header for trace.c
 **/

#ifndef TOR_LIB_TRACE_TRACE_H
#define TOR_LIB_TRACE_TRACE_H

#include "orconfig.h"

void tor_trace_init(void);
void tor_trace_free_all(void);

#ifdef HAVE_TRACING

#include "lib/log/log.h"

static inline void
tracing_log_warning(void)
{
  log_warn(LD_GENERAL,
           "Tracing capabilities have been built in. If this is NOT on "
           "purpose, your tor is NOT safe to run.");
}

#else /* !defined(HAVE_TRACING) */

/* NOP it. */
#define tracing_log_warning()

#endif /* defined(HAVE_TRACING) */

#endif /* !defined(TOR_LIB_TRACE_TRACE_H) */