summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Logging/LogManager.cpp
diff options
context:
space:
mode:
authorMai M <mathew1800@gmail.com>2022-04-08 20:47:57 -0400
committerGitHub <noreply@github.com>2022-04-08 20:47:57 -0400
commitdcf27b91bafd3ae2f69413ab3faa04b8e295fe3e (patch)
treef0fe2d80fb01f76b2b5b26e2ba36af0b78cd866f /Source/Core/Common/Logging/LogManager.cpp
parent120208ae03d7dd464e05c90dfa14959a591af5ce (diff)
parentdf214af8a1a3b19f1c06041853daa59dcc927780 (diff)
Merge pull request #10572 from AdmiralCurtiss/ffmpeg-log-va-list
VideoCommon/FrameDump: Fix log messages with arguments.
Diffstat (limited to 'Source/Core/Common/Logging/LogManager.cpp')
-rw-r--r--Source/Core/Common/Logging/LogManager.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/Core/Common/Logging/LogManager.cpp b/Source/Core/Common/Logging/LogManager.cpp
index a7b0b010ea..bed3a183e4 100644
--- a/Source/Core/Common/Logging/LogManager.cpp
+++ b/Source/Core/Common/Logging/LogManager.cpp
@@ -80,6 +80,22 @@ void GenericLog(LogLevel level, LogType type, const char* file, int line, const
instance->Log(level, type, file, line, message);
}
+void GenericLogV(LogLevel level, LogType type, const char* file, int line, const char* fmt,
+ va_list args)
+{
+ auto* instance = LogManager::GetInstance();
+ if (instance == nullptr)
+ return;
+
+ if (!instance->IsEnabled(type, level))
+ return;
+
+ char message[MAX_MSGLEN];
+ CharArrayFromFormatV(message, MAX_MSGLEN, fmt, args);
+
+ instance->Log(level, type, file, line, message);
+}
+
void GenericLogFmtImpl(LogLevel level, LogType type, const char* file, int line,
fmt::string_view format, const fmt::format_args& args)
{