Exemple #1
0
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);
  }
}
Exemple #2
0
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);
  }
}
Exemple #3
0
void CLog::LogString(int logLevel, int component, std::string&& logString)
{
  if (CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->CanLogComponent(component) && IsLogLevelLogged(logLevel))
    LogString(logLevel, std::move(logString));
}