From 5742b5c64702258163142a4460c2df6af5b4d192 Mon Sep 17 00:00:00 2001 From: Botond Ballo Date: Tue, 21 Jan 2014 20:11:52 -0500 Subject: [PATCH] Bug 958596 - Add support for gfx logging on android and b2g. r=Bas --HG-- extra : rebase_source : 8d5a1c0dfc4f5f74e8417531b1f9f39c54e85d49 --- gfx/2d/Logging.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gfx/2d/Logging.h b/gfx/2d/Logging.h index f508f6aebd5b..e7babb6dba33 100644 --- a/gfx/2d/Logging.h +++ b/gfx/2d/Logging.h @@ -10,6 +10,7 @@ #include #include +#include "nsDebug.h" #include "Point.h" #include "Matrix.h" @@ -57,13 +58,13 @@ static inline void OutputMessage(const std::string &aString, int aLevel) { if (aLevel >= sGfxLogLevel) { ::OutputDebugStringA(aString.c_str()); } -#elif defined(PR_LOGGING) +#elif defined(PR_LOGGING) && !(defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_ANDROID)) if (PR_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) { PR_LogPrint(aString.c_str()); } #else if (aLevel >= sGfxLogLevel) { - printf("%s", aString.c_str()); + printf_stderr("%s", aString.c_str()); } #endif }