minigbm: cros_gralloc: modify error statements

The error statements now look like what's printed in
Chrome's /var/log/ui/ui.LATEST, which I think looks nice.

BUG=chromium:616275
TEST=None
CQ-DEPEND=CL:416397

Change-Id: Ide3eb381ac710f016e9d002e4dd5f9e5ab8eda7f
Reviewed-on: https://chromium-review.googlesource.com/416398
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
diff --git a/cros_gralloc/cros_gralloc_helpers.cc b/cros_gralloc/cros_gralloc_helpers.cc
index c38d8bc..afb1a96 100644
--- a/cros_gralloc/cros_gralloc_helpers.cc
+++ b/cros_gralloc/cros_gralloc_helpers.cc
@@ -156,9 +156,11 @@
 void cros_gralloc_log(const char *prefix, const char *file, int line,
 		      const char *format, ...)
 {
+	char buf[50];
+	snprintf(buf, sizeof(buf), "[%s:%s(%d)]", prefix, basename(file), line);
+
 	va_list args;
 	va_start(args, format);
-	ALOGE("%s - [%s(%d)]", prefix, basename(file), line);
-	__android_log_vprint(ANDROID_LOG_ERROR, prefix, format, args);
+	__android_log_vprint(ANDROID_LOG_ERROR, buf, format, args);
 	va_end(args);
 }
diff --git a/cros_gralloc/cros_gralloc_helpers.h b/cros_gralloc/cros_gralloc_helpers.h
index fe88891..7ba3a9a 100644
--- a/cros_gralloc/cros_gralloc_helpers.h
+++ b/cros_gralloc/cros_gralloc_helpers.h
@@ -80,7 +80,7 @@
 
 #define cros_gralloc_error(...)                                     \
 	do {                                                        \
-		cros_gralloc_log("cros_gralloc_error", __FILE__,    \
+		cros_gralloc_log("CROS_GRALLOC_ERROR", __FILE__,    \
 				 __LINE__, __VA_ARGS__);            \
 	} while (0)