This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tango-tsg-service-chaining-…/common/src/log.cpp
2023-02-20 14:15:41 +08:00

34 lines
657 B
C++

#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("sce", 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_handle_runtime_log_destruction();
}
void LOG_RELOAD(void)
{
MESA_handle_runtime_log_reconstruction(NULL);
}