Common: Migrate logging to fmt

Continues the migration of our code over to the fmt logger.
This commit is contained in:
Lioncash
2020-10-23 14:41:30 -04:00
parent 4f5c8bb42a
commit 4e8df93f41
18 changed files with 154 additions and 152 deletions

View File

@ -31,15 +31,15 @@ GLuint CompileProgram(const std::string& vertexShader, const std::string& fragme
if (Result && stringBufferUsage)
{
ERROR_LOG(VIDEO, "GLSL vertex shader warnings:\n%s%s", stringBuffer, vertexShader.c_str());
ERROR_LOG_FMT(VIDEO, "GLSL vertex shader warnings:\n{}{}", stringBuffer, vertexShader);
}
else if (!Result)
{
ERROR_LOG(VIDEO, "GLSL vertex shader error:\n%s%s", stringBuffer, vertexShader.c_str());
ERROR_LOG_FMT(VIDEO, "GLSL vertex shader error:\n{}{}", stringBuffer, vertexShader);
}
else
{
INFO_LOG(VIDEO, "GLSL vertex shader compiled:\n%s", vertexShader.c_str());
INFO_LOG_FMT(VIDEO, "GLSL vertex shader compiled:\n{}", vertexShader);
}
bool shader_errors = !Result;
@ -55,15 +55,15 @@ GLuint CompileProgram(const std::string& vertexShader, const std::string& fragme
if (Result && stringBufferUsage)
{
ERROR_LOG(VIDEO, "GLSL fragment shader warnings:\n%s%s", stringBuffer, fragmentShader.c_str());
ERROR_LOG_FMT(VIDEO, "GLSL fragment shader warnings:\n{}{}", stringBuffer, fragmentShader);
}
else if (!Result)
{
ERROR_LOG(VIDEO, "GLSL fragment shader error:\n%s%s", stringBuffer, fragmentShader.c_str());
ERROR_LOG_FMT(VIDEO, "GLSL fragment shader error:\n{}{}", stringBuffer, fragmentShader);
}
else
{
INFO_LOG(VIDEO, "GLSL fragment shader compiled:\n%s", fragmentShader.c_str());
INFO_LOG_FMT(VIDEO, "GLSL fragment shader compiled:\n{}", fragmentShader);
}
shader_errors |= !Result;
@ -79,13 +79,12 @@ GLuint CompileProgram(const std::string& vertexShader, const std::string& fragme
if (Result && stringBufferUsage)
{
ERROR_LOG(VIDEO, "GLSL linker warnings:\n%s%s%s", stringBuffer, vertexShader.c_str(),
fragmentShader.c_str());
ERROR_LOG_FMT(VIDEO, "GLSL linker warnings:\n{}{}{}", stringBuffer, vertexShader,
fragmentShader);
}
else if (!Result && !shader_errors)
{
ERROR_LOG(VIDEO, "GLSL linker error:\n%s%s%s", stringBuffer, vertexShader.c_str(),
fragmentShader.c_str());
ERROR_LOG_FMT(VIDEO, "GLSL linker error:\n{}{}{}", stringBuffer, vertexShader, fragmentShader);
}
#endif