Commit 3f8975e1 by James Dong Committed by Commit Bot

Debug: suppress INFO log level in tests

Disables INFO level log messages in tests, including GL errors. Bug: angleproject:3525 Change-Id: Ib16871b9faaff54964dd2770e1791372b1b79361 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1656293Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: James Dong <dongja@google.com>
parent 875509e9
...@@ -168,7 +168,24 @@ void Debug::insertMessage(GLenum source, ...@@ -168,7 +168,24 @@ void Debug::insertMessage(GLenum source,
const char *severityString = GLSeverityToString(severity); const char *severityString = GLSeverityToString(severity);
std::ostringstream messageStream; std::ostringstream messageStream;
messageStream << "GL " << messageTypeString << ": " << severityString << ": " << message; messageStream << "GL " << messageTypeString << ": " << severityString << ": " << message;
gl::Trace(logSeverity, messageStream.str().c_str()); switch (logSeverity)
{
case gl::LOG_FATAL:
FATAL() << messageStream.str();
break;
case gl::LOG_ERR:
ERR() << messageStream.str();
break;
case gl::LOG_WARN:
WARN() << messageStream.str();
break;
case gl::LOG_INFO:
INFO() << messageStream.str();
break;
case gl::LOG_EVENT:
ANGLE_LOG(EVENT) << messageStream.str();
break;
}
} }
if (!isMessageEnabled(source, type, id, severity)) if (!isMessageEnabled(source, type, id, severity))
...@@ -442,7 +459,7 @@ void Debug::insertMessage(EGLenum error, ...@@ -442,7 +459,7 @@ void Debug::insertMessage(EGLenum error,
const char *messageTypeString = EGLMessageTypeToString(messageType); const char *messageTypeString = EGLMessageTypeToString(messageType);
std::ostringstream messageStream; std::ostringstream messageStream;
messageStream << "EGL " << messageTypeString << ": " << command << ": " << message; messageStream << "EGL " << messageTypeString << ": " << command << ": " << message;
gl::Trace(gl::LOG_INFO, messageStream.str().c_str()); INFO() << messageStream.str();
} }
// TODO(geofflang): Lock before checking the callback. http://anglebug.com/2464 // TODO(geofflang): Lock before checking the callback. http://anglebug.com/2464
......
...@@ -78,14 +78,7 @@ void TestPlatform_logWarning(PlatformMethods *platform, const char *warningMessa ...@@ -78,14 +78,7 @@ void TestPlatform_logWarning(PlatformMethods *platform, const char *warningMessa
} }
} }
void TestPlatform_logInfo(PlatformMethods *platform, const char *infoMessage) void TestPlatform_logInfo(PlatformMethods *platform, const char *infoMessage) {}
{
auto *testPlatformContext = static_cast<TestPlatformContext *>(platform->context);
if (testPlatformContext->ignoreMessages)
return;
WriteDebugMessage("%s\n", infoMessage);
}
void TestPlatform_overrideFeaturesD3D(PlatformMethods *platform, FeaturesD3D *featuresD3D) void TestPlatform_overrideFeaturesD3D(PlatformMethods *platform, FeaturesD3D *featuresD3D)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment