Bug 1072605 - Just use PR_LOGGING to determine if logging is enabled. r=Bas
--- 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;
}