Bug 1072605 - Just use PR_LOGGING to determine if logging is enabled. r=Bas
authorEric Rahm <erahm@mozilla.com>
Mon, 06 Oct 2014 09:33:06 -0700
changeset 209024 ef7d6554b13dabd115b9350a4fe3aefd3dc9f52d
parent 209023 f5a23b027d12af93e8d787a2affac5a1f9e2ec00
child 209025 8d3d8d907e4e26513c402cbc6379c999328f75df
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersBas
bugs1072605
milestone35.0a1
Bug 1072605 - Just use PR_LOGGING to determine if logging is enabled. r=Bas
gfx/2d/Logging.h
--- a/gfx/2d/Logging.h
+++ b/gfx/2d/Logging.h
@@ -5,16 +5,20 @@
 
 #ifndef MOZILLA_GFX_LOGGING_H_
 #define MOZILLA_GFX_LOGGING_H_
 
 #include <string>
 #include <sstream>
 #include <stdio.h>
 
+#ifdef MOZ_LOGGING
+#include <prlog.h>
+#endif
+
 #if defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_ANDROID)
 #include "nsDebug.h"
 #endif
 #include "Point.h"
 #include "BaseRect.h"
 #include "Matrix.h"
 #include "mozilla/TypedEnum.h"
 
@@ -24,30 +28,28 @@
 // thing we need from windows.h, we just declare it here directly.
 // Note: the function's documented signature is
 //  WINBASEAPI void WINAPI OutputDebugStringA(LPCSTR lpOutputString)
 // but if we don't include windows.h, the macros WINBASEAPI, WINAPI, and 
 // LPCSTR are not defined, so we need to replace them with their expansions.
 extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA(const char* lpOutputString);
 #endif
 
-#if defined(DEBUG) || defined(PR_LOGGING)
-#include <prlog.h>
-
+#if defined(PR_LOGGING)
 extern GFX2D_API PRLogModuleInfo *GetGFX2DLog();
 #endif
 
 namespace mozilla {
 namespace gfx {
 
 const int LOG_DEBUG = 1;
 const int LOG_WARNING = 2;
 const int LOG_CRITICAL = 3;
 
-#if defined(DEBUG) || defined(PR_LOGGING)
+#if defined(PR_LOGGING)
 
 inline PRLogModuleLevel PRLogLevelForLevel(int aLevel) {
   switch (aLevel) {
   case LOG_DEBUG:
     return PR_LOG_DEBUG;
   case LOG_WARNING:
     return PR_LOG_WARNING;
   }