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

Method Log

phxqueue/plugin/logger_google.cpp:65–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64
65void LoggerGoogle::Log(const int log_level, const char *format, va_list args) {
66 char buf[1024] = {0};
67 vsnprintf(buf, sizeof(buf), format, args);
68
69 int google_log_level{LogLevel2GoogleLogLevel(static_cast<comm::LogLevel>(log_level))};
70 if (google_log_level < 0) return;
71
72 switch (google_log_level) {
73 case google::INFO:
74 LOG(INFO) << buf;
75 break;
76 case google::WARNING:
77 LOG(WARNING) << buf;
78 break;
79 case google::ERROR:
80 LOG(ERROR) << buf;
81 break;
82 case google::FATAL:
83 LOG(FATAL) << buf;
84 break;
85 default:
86 break;
87 }
88}
89
90
91} // namespace plugin

Callers

nothing calls this directly

Calls 1

LogLevel2GoogleLogLevelFunction · 0.85

Tested by

no test coverage detected