void CLog::Log(int loglevel, const char *format, ...) { if (IsLogLevelLogged(loglevel)) { va_list va; va_start(va, format); LogString(loglevel, StringUtils::FormatV(format, va)); va_end(va); } }
void CLog::LogFunction(int loglevel, const char* functionName, const char* format, ...) { if (IsLogLevelLogged(loglevel)) { std::string fNameStr; if (functionName && functionName[0]) fNameStr.assign(functionName).append(": "); va_list va; va_start(va, format); LogString(loglevel, fNameStr + StringUtils::FormatV(format, va)); va_end(va); } }
void CLog::LogString(int logLevel, int component, std::string&& logString) { if (CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->CanLogComponent(component) && IsLogLevelLogged(logLevel)) LogString(logLevel, std::move(logString)); }