MCPcopy Create free account
hub / github.com/Tencent/phxqueue / GetLogger

Method GetLogger

phxqueue/plugin/logger_sys.cpp:54–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52static int g_sys_log_level_threshold = 0;
53
54int LoggerSys::GetLogger(const std::string &module_name,
55 const int sys_log_level, const bool daemonize, comm::LogFunc &log_func) {
56
57 openlog(module_name.c_str(), (daemonize ? LOG_PERROR : 0) | LOG_CONS | LOG_PID, 0);
58 g_sys_log_level_threshold = sys_log_level;
59 log_func = LoggerSys::Log;
60
61 return 0;
62}
63
64void LoggerSys::Log(const int log_level, const char *format, va_list args) {
65 int sys_log_level = LogLevel2SysLogLevel(static_cast<comm::LogLevel>(log_level));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected