Update copyrights to 2021, using "make update-copyright"
[tor.git] / src / lib / trace / trace_sys.c
blob0a68e2443354d177f9b8ae31fc6b663fac1af057
1 /* Copyright (c) 2018-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
4 /**
5 * \file log_sys.c
6 * \brief Setup and tear down the tracing module.
7 **/
9 #include "lib/subsys/subsys.h"
11 #include "lib/trace/trace.h"
12 #include "lib/trace/trace_sys.h"
14 static int
15 subsys_tracing_initialize(void)
17 tor_trace_init();
18 return 0;
21 static void
22 subsys_tracing_shutdown(void)
24 tor_trace_free_all();
27 const subsys_fns_t sys_tracing = {
28 SUBSYS_DECLARE_LOCATION(),
30 .name = "tracing",
31 .supported = true,
32 .level = TRACE_SUBSYS_LEVEL,
34 .initialize = subsys_tracing_initialize,
35 .shutdown = subsys_tracing_shutdown,