blob: 2ba02584072bea527fdd677b3880d7a58a5ab4da (
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) 2018-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* \file log_sys.c
* \brief Setup and tear down the tracing module.
**/
#include "lib/subsys/subsys.h"
#include "lib/trace/trace.h"
#include "lib/trace/trace_sys.h"
static int
subsys_tracing_initialize(void)
{
tor_trace_init();
return 0;
}
static void
subsys_tracing_shutdown(void)
{
tor_trace_free_all();
}
const subsys_fns_t sys_tracing = {
SUBSYS_DECLARE_LOCATION(),
.name = "tracing",
.supported = true,
.level = TRACE_SUBSYS_LEVEL,
.initialize = subsys_tracing_initialize,
.shutdown = subsys_tracing_shutdown,
};
|