aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2017-08-18 10:18:26 +0200
committerGitHub <noreply@github.com>2017-08-18 10:18:26 +0200
commit4c43b6a414458648b24a960ae35448388f131570 (patch)
treee3f0c534e11df70775db6a231e4aabc7e9ee5d38
parent2974ab38c4df42e2693b1bda0fd11b74675028b0 (diff)
parent139fe7103582059189fc9905736dafd69e9c8c3b (diff)
Merge pull request #12685 from Rechi/fixComponentLogging
[utils] fix component log functions introduced at 06bbead
-rw-r--r--xbmc/input/InputManager.cpp2
-rw-r--r--xbmc/utils/log.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/xbmc/input/InputManager.cpp b/xbmc/input/InputManager.cpp
index 0bdc8ca029..737396fb57 100644
--- a/xbmc/input/InputManager.cpp
+++ b/xbmc/input/InputManager.cpp
@@ -198,7 +198,7 @@ bool CInputManager::ProcessMouse(int windowId)
// handled this mouse action
if (!mouseaction.GetID())
{
- CLog::LogF(LOGDEBUG, LOGAUDIO, "unknown mouse command %d", mousekey);
+ CLog::LogF(LOGDEBUG, "unknown mouse command %d", mousekey);
return false;
}
diff --git a/xbmc/utils/log.cpp b/xbmc/utils/log.cpp
index 5d9bfd2ce0..e1a7280a24 100644
--- a/xbmc/utils/log.cpp
+++ b/xbmc/utils/log.cpp
@@ -60,11 +60,11 @@ void CLog::Log(int loglevel, PRINTF_FORMAT_STRING const char *format, ...)
void CLog::Log(int loglevel, int component, PRINTF_FORMAT_STRING const char *format, ...)
{
- if (g_advancedSettings.CanLogComponent(component))
+ if (g_advancedSettings.CanLogComponent(component) && IsLogLevelLogged(loglevel))
{
va_list va;
va_start(va, format);
- CLog::Log(loglevel, format, va);
+ LogString(loglevel, StringUtils::FormatV(format, va));
va_end(va);
}
}
@@ -89,7 +89,7 @@ void CLog::LogFunction(int loglevel, const char* functionName, int component, co
{
va_list va;
va_start(va, format);
- CLog::LogFunction(loglevel, functionName, format, va);
+ LogFunction(loglevel, functionName, StringUtils::FormatV(format, va).c_str());
va_end(va);
}
}