Tor
0.4.6.0-alpha-dev
lib
trace
trace_sys.c
1
/* Copyright (c) 2018-2019, The Tor Project, Inc. */
2
/* See LICENSE for licensing information */
3
4
/**
5
* \file log_sys.c
6
* \brief Setup and tear down the tracing module.
7
**/
8
9
#include "
lib/subsys/subsys.h
"
10
11
#include "
lib/trace/trace.h
"
12
#include "lib/trace/trace_sys.h"
13
14
static
int
15
subsys_tracing_initialize(
void
)
16
{
17
tor_trace_init
();
18
return
0;
19
}
20
21
static
void
22
subsys_tracing_shutdown(
void
)
23
{
24
tor_trace_free_all
();
25
}
26
27
const
subsys_fns_t
sys_tracing = {
28
SUBSYS_DECLARE_LOCATION
(),
29
30
.name =
"tracing"
,
31
.supported =
true
,
32
.level = TRACE_SUBSYS_LEVEL,
33
34
.initialize = subsys_tracing_initialize,
35
.shutdown = subsys_tracing_shutdown,
36
};
SUBSYS_DECLARE_LOCATION
#define SUBSYS_DECLARE_LOCATION()
Definition:
subsys.h:211
tor_trace_free_all
void tor_trace_free_all(void)
Definition:
trace.c:21
trace.h
Header for trace.c.
subsys.h
Types used to declare a subsystem.
tor_trace_init
void tor_trace_init(void)
Definition:
trace.c:15
subsys_fns_t
Definition:
subsys.h:38
Generated by
1.8.20