Direct logging to Platform when available

All logging should be done via ERR() and WARN(),
which call angle::Platform's logError and logWarning,
if there is current Platform which supports logging.
Otherwise, ERR() is directed to std::cerr.

Misc fixes to keep tests passing.

BUG=angleproject:1660, angleproject:1644

Change-Id: I2bca33a021537185d0c236a3083789af3236b5f3
Reviewed-on: https://chromium-review.googlesource.com/434188
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/gl/ProgramGL.cpp b/src/libANGLE/renderer/gl/ProgramGL.cpp
index 20abd12..acbed58 100644
--- a/src/libANGLE/renderer/gl/ProgramGL.cpp
+++ b/src/libANGLE/renderer/gl/ProgramGL.cpp
@@ -591,8 +591,6 @@
         GLint infoLogLength = 0;
         mFunctions->getProgramiv(mProgramID, GL_INFO_LOG_LENGTH, &infoLogLength);
 
-        std::string warning;
-
         // Info log length includes the null terminator, so 1 means that the info log is an empty
         // string.
         if (infoLogLength > 1)
@@ -605,14 +603,12 @@
 
             infoLog << buf.data();
 
-            warning = FormatString("Program link failed unexpectedly: %s", buf.data());
+            WARN() << "Program link failed unexpectedly: " << buf.data();
         }
         else
         {
-            warning = "Program link failed unexpectedly with no info log.";
+            WARN() << "Program link failed unexpectedly with no info log.";
         }
-        ANGLEPlatformCurrent()->logWarning(warning.c_str());
-        WARN() << std::endl << warning;
 
         // TODO, return GL_OUT_OF_MEMORY or just fail the link? This is an unexpected case
         return false;