blob: af4794e3407d6df6b742a12238a1cff3bcdea5c6 (
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
|
#include "log.h"
void *g_default_logger = NULL;
// return 0 : success
// return -1 : error
int LOG_INIT(const char *profile)
{
if (0 != MESA_handle_runtime_log_creation(profile))
{
fprintf(stderr, "FATAL: unable to create runtime logger\n");
return -1;
}
g_default_logger = MESA_create_runtime_log_handle("log/shaping", RLOG_LV_DEBUG);
if (g_default_logger == NULL)
{
fprintf(stderr, "FATAL: unable to create log handle\n");
return -1;
}
return 0;
}
void LOG_CLOSE(void)
{
MESA_destroy_runtime_log_handle(g_default_logger);
MESA_handle_runtime_log_destruction();
}
void LOG_RELOAD(void)
{
MESA_handle_runtime_log_reconstruction(NULL);
}
|