mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Common: Unify logging namespace with Common
Previously the logging was a in a little bit of a disarray. Some things were in namespaces, and other things were not. Given this code will feature a bit of restructuring during the transition over to fmt, this is a good time to unify it under a single namespace and also remove functions and types from the global namespace. Now, all functions and types are under the Common::Log namespace. The only outliers being, of course, the preprocessor macros.
This commit is contained in:
@ -669,13 +669,13 @@ static VKAPI_ATTR VkBool32 VKAPI_CALL DebugReportCallback(VkDebugReportFlagsEXT
|
||||
std::string log_message =
|
||||
StringFromFormat("Vulkan debug report: (%s) %s", pLayerPrefix ? pLayerPrefix : "", pMessage);
|
||||
if (flags & VK_DEBUG_REPORT_ERROR_BIT_EXT)
|
||||
GENERIC_LOG(LogTypes::HOST_GPU, LogTypes::LERROR, "%s", log_message.c_str());
|
||||
GENERIC_LOG(Common::Log::HOST_GPU, Common::Log::LERROR, "%s", log_message.c_str());
|
||||
else if (flags & (VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT))
|
||||
GENERIC_LOG(LogTypes::HOST_GPU, LogTypes::LWARNING, "%s", log_message.c_str());
|
||||
GENERIC_LOG(Common::Log::HOST_GPU, Common::Log::LWARNING, "%s", log_message.c_str());
|
||||
else if (flags & VK_DEBUG_REPORT_INFORMATION_BIT_EXT)
|
||||
GENERIC_LOG(LogTypes::HOST_GPU, LogTypes::LINFO, "%s", log_message.c_str());
|
||||
GENERIC_LOG(Common::Log::HOST_GPU, Common::Log::LINFO, "%s", log_message.c_str());
|
||||
else
|
||||
GENERIC_LOG(LogTypes::HOST_GPU, LogTypes::LDEBUG, "%s", log_message.c_str());
|
||||
GENERIC_LOG(Common::Log::HOST_GPU, Common::Log::LDEBUG, "%s", log_message.c_str());
|
||||
|
||||
return VK_FALSE;
|
||||
}
|
||||
|
@ -216,7 +216,8 @@ void LogVulkanResult(int level, const char* func_name, VkResult res, const char*
|
||||
real_msg = StringFromFormat("(%s) %s (%d: %s)", func_name, real_msg.c_str(),
|
||||
static_cast<int>(res), VkResultToString(res));
|
||||
|
||||
GENERIC_LOG(LogTypes::VIDEO, static_cast<LogTypes::LOG_LEVELS>(level), "%s", real_msg.c_str());
|
||||
GENERIC_LOG(Common::Log::VIDEO, static_cast<Common::Log::LOG_LEVELS>(level), "%s",
|
||||
real_msg.c_str());
|
||||
}
|
||||
|
||||
} // namespace Vulkan
|
||||
|
@ -79,7 +79,8 @@ void VideoBackend::InitBackendInfo()
|
||||
// Helper method to check whether the Host GPU logging category is enabled.
|
||||
static bool IsHostGPULoggingEnabled()
|
||||
{
|
||||
return LogManager::GetInstance()->IsEnabled(LogTypes::HOST_GPU, LogTypes::LERROR);
|
||||
return Common::Log::LogManager::GetInstance()->IsEnabled(Common::Log::HOST_GPU,
|
||||
Common::Log::LERROR);
|
||||
}
|
||||
|
||||
// Helper method to determine whether to enable the debug report extension.
|
||||
|
Reference in New Issue
Block a user