blob: d1080f226428984bde3e56142fc2c097bbdbc732 (
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
|
/* Copyright (c) 2018-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* \file log_sys.c
* \brief Setup and tear down the logging module.
**/
#include "orconfig.h"
#include "lib/subsys/subsys.h"
#include "lib/log/escape.h"
#include "lib/log/log.h"
#include "lib/log/log_sys.h"
static int
subsys_logging_initialize(void)
{
init_logging(0);
return 0;
}
static void
subsys_logging_shutdown(void)
{
logs_free_all();
escaped(NULL);
}
const subsys_fns_t sys_logging = {
.name = "log",
.supported = true,
.level = -90,
.initialize = subsys_logging_initialize,
.shutdown = subsys_logging_shutdown,
};
|