Bug 1165515 - Part 9: Remove instances of using numeric log levels 1-5. rs=froydnj
☠☠ backed out by 3c8ed81098dd ☠ ☠
authorEric Rahm <erahm@mozilla.com>
Mon, 01 Jun 2015 22:17:26 -0700
changeset 246761 c16d215cc7e4c09bab6478c8bc9b4d72fae87cf5
parent 246760 e4d474f3c51a0c6c9224c40dfe78028d5268e980
child 246762 e9632ce8bc65ac746babf0d756bb22a31c0afa93
push id13318
push userkwierso@gmail.com
push dateWed, 03 Jun 2015 01:44:38 +0000
treeherderfx-team@db827f2026fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1165515
milestone41.0a1
Bug 1165515 - Part 9: Remove instances of using numeric log levels 1-5. rs=froydnj
dom/media/systemservices/LoadManager.cpp
dom/media/systemservices/LoadMonitor.cpp
js/xpconnect/src/XPCLog.cpp
modules/libjar/nsJARChannel.cpp
netwerk/base/BackgroundFileSaver.cpp
netwerk/base/Predictor.cpp
netwerk/protocol/http/HttpBaseChannel.h
netwerk/protocol/http/HttpLog.h
netwerk/protocol/http/nsHttpConnectionInfo.h
netwerk/protocol/wyciwyg/nsWyciwyg.h
security/manager/ssl/nsSiteSecurityService.cpp
uriloader/exthandler/nsExternalHelperAppService.cpp
uriloader/prefetch/OfflineCacheUpdateChild.cpp
uriloader/prefetch/OfflineCacheUpdateGlue.cpp
uriloader/prefetch/OfflineCacheUpdateParent.cpp
uriloader/prefetch/nsOfflineCacheUpdate.cpp
uriloader/prefetch/nsOfflineCacheUpdateService.cpp
uriloader/prefetch/nsPrefetchService.cpp
widget/gtk/nsWindow.h
widget/qt/nsWindow.h
--- a/dom/media/systemservices/LoadManager.cpp
+++ b/dom/media/systemservices/LoadManager.cpp
@@ -17,17 +17,17 @@
 #include "nsNetUtil.h"
 #include "nsIObserverService.h"
 
 // NSPR_LOG_MODULES=LoadManager:5
 PRLogModuleInfo *gLoadManagerLog = nullptr;
 #undef LOG
 #undef LOG_ENABLED
 #define LOG(args) MOZ_LOG(gLoadManagerLog, PR_LOG_DEBUG, args)
-#define LOG_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, 5)
+#define LOG_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, PR_LOG_VERBOSE)
 
 namespace mozilla {
 
 /* static */ StaticRefPtr<LoadManagerSingleton> LoadManagerSingleton::sSingleton;
 
 NS_IMPL_ISUPPORTS(LoadManagerSingleton, nsIObserver)
 
 
--- a/dom/media/systemservices/LoadMonitor.cpp
+++ b/dom/media/systemservices/LoadMonitor.cpp
@@ -52,18 +52,18 @@
 #include <tchar.h>
 #pragma comment(lib, "pdh.lib")
 #endif
 
 // NSPR_LOG_MODULES=LoadManager:5
 #undef LOG
 #undef LOG_ENABLED
 #define LOG(args) MOZ_LOG(gLoadManagerLog, PR_LOG_DEBUG, args)
-#define LOG_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, 4)
-#define LOG_MANY_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, 5)
+#define LOG_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, PR_LOG_DEBUG)
+#define LOG_MANY_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, PR_LOG_VERBOSE)
 
 namespace mozilla {
 
 NS_IMPL_ISUPPORTS(LoadMonitor, nsIObserver)
 
 LoadMonitor::LoadMonitor(int aLoadUpdateInterval)
   : mLoadUpdateInterval(aLoadUpdateInterval),
     mLock("LoadMonitor.mLock"),
--- a/js/xpconnect/src/XPCLog.cpp
+++ b/js/xpconnect/src/XPCLog.cpp
@@ -26,17 +26,17 @@ static char*    g_Spaces;
 static int      g_InitState = 0;
 static int      g_Indent = 0;
 static PRLogModuleInfo* g_LogMod = nullptr;
 
 static bool Init()
 {
     g_LogMod = PR_NewLogModule("xpclog");
     g_Spaces = new char[SPACE_COUNT+1];
-    if (!g_LogMod || !g_Spaces || !MOZ_LOG_TEST(g_LogMod,1)) {
+    if (!g_LogMod || !g_Spaces || !MOZ_LOG_TEST(g_LogMod,PR_LOG_ERROR)) {
         g_InitState = 1;
         XPC_Log_Finish();
         return false;
     }
     memset(g_Spaces, ' ', SPACE_COUNT);
     g_Spaces[SPACE_COUNT] = 0;
     g_InitState = 1;
     return true;
@@ -66,17 +66,17 @@ XPC_Log_print(const char* fmt, ...)
         PR_LogPrint("%s%s",g_Spaces+SPACE_COUNT-(INDENT_FACTOR*g_Indent),line);
     else
         PR_LogPrint("%s",line);
 }
 
 bool
 XPC_Log_Check(int i)
 {
-    return CAN_RUN && MOZ_LOG_TEST(g_LogMod,1);
+    return CAN_RUN && MOZ_LOG_TEST(g_LogMod,PR_LOG_ERROR);
 }
 
 void
 XPC_Log_Indent()
 {
     if (INDENT_FACTOR*(++g_Indent) > SPACE_COUNT)
         g_Indent-- ;
 }
--- a/modules/libjar/nsJARChannel.cpp
+++ b/modules/libjar/nsJARChannel.cpp
@@ -47,17 +47,17 @@ static NS_DEFINE_CID(kZipReaderCID, NS_Z
 #endif
 
 //
 // set NSPR_LOG_MODULES=nsJarProtocol:5
 //
 static PRLogModuleInfo *gJarProtocolLog = nullptr;
 
 #define LOG(args)     MOZ_LOG(gJarProtocolLog, PR_LOG_DEBUG, args)
-#define LOG_ENABLED() MOZ_LOG_TEST(gJarProtocolLog, 4)
+#define LOG_ENABLED() MOZ_LOG_TEST(gJarProtocolLog, PR_LOG_DEBUG)
 
 //-----------------------------------------------------------------------------
 // nsJARInputThunk
 //
 // this class allows us to do some extra work on the stream transport thread.
 //-----------------------------------------------------------------------------
 
 class nsJARInputThunk : public nsIInputStream
--- a/netwerk/base/BackgroundFileSaver.cpp
+++ b/netwerk/base/BackgroundFileSaver.cpp
@@ -30,17 +30,17 @@
 #endif // XP_WIN
 
 namespace mozilla {
 namespace net {
 
 // NSPR_LOG_MODULES=BackgroundFileSaver:5
 PRLogModuleInfo *BackgroundFileSaver::prlog = nullptr;
 #define LOG(args) MOZ_LOG(BackgroundFileSaver::prlog, PR_LOG_DEBUG, args)
-#define LOG_ENABLED() MOZ_LOG_TEST(BackgroundFileSaver::prlog, 4)
+#define LOG_ENABLED() MOZ_LOG_TEST(BackgroundFileSaver::prlog, PR_LOG_DEBUG)
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Globals
 
 /**
  * Buffer size for writing to the output file or reading from the input file.
  */
 #define BUFFERED_IO_SIZE (1024 * 32)
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -49,17 +49,17 @@ static const int32_t ANDROID_23_VERSION 
 using namespace mozilla;
 
 namespace mozilla {
 namespace net {
 
 Predictor *Predictor::sSelf = nullptr;
 
 static PRLogModuleInfo *gPredictorLog = nullptr;
-#define PREDICTOR_LOG(args) MOZ_LOG(gPredictorLog, 4, args)
+#define PREDICTOR_LOG(args) MOZ_LOG(gPredictorLog, PR_LOG_DEBUG, args)
 
 #define RETURN_IF_FAILED(_rv) \
   do { \
     if (NS_FAILED(_rv)) { \
       return; \
     } \
   } while (0)
 
--- a/netwerk/protocol/http/HttpBaseChannel.h
+++ b/netwerk/protocol/http/HttpBaseChannel.h
@@ -469,34 +469,34 @@ private:
 protected:
   // Function to be called at resume time
   void (T::* mCallOnResume)(void);
 };
 
 template <class T>
 nsresult HttpAsyncAborter<T>::AsyncAbort(nsresult status)
 {
-  MOZ_LOG(gHttpLog, 4,
+  MOZ_LOG(gHttpLog, PR_LOG_DEBUG,
          ("HttpAsyncAborter::AsyncAbort [this=%p status=%x]\n", mThis, status));
 
   mThis->mStatus = status;
 
   // if this fails?  Callers ignore our return value anyway....
   return AsyncCall(&T::HandleAsyncAbort);
 }
 
 // Each subclass needs to define its own version of this (which just calls this
 // base version), else we wind up casting base/derived member function ptrs
 template <class T>
 inline void HttpAsyncAborter<T>::HandleAsyncAbort()
 {
   NS_PRECONDITION(!mCallOnResume, "How did that happen?");
 
   if (mThis->mSuspendCount) {
-    MOZ_LOG(gHttpLog, 4,
+    MOZ_LOG(gHttpLog, PR_LOG_DEBUG,
            ("Waiting until resume to do async notification [this=%p]\n", mThis));
     mCallOnResume = &T::HandleAsyncAbort;
     return;
   }
 
   mThis->DoNotifyListener();
 
   // finally remove ourselves from the load group.
--- a/netwerk/protocol/http/HttpLog.h
+++ b/netwerk/protocol/http/HttpLog.h
@@ -32,23 +32,23 @@
 //    set NSPR_LOG_FILE=http.log
 //
 // this enables PR_LOG_DEBUG level information and places all output in
 // the file http.log
 //
 extern PRLogModuleInfo *gHttpLog;
 
 // http logging
-#define LOG1(args) MOZ_LOG(gHttpLog, 1, args)
-#define LOG2(args) MOZ_LOG(gHttpLog, 2, args)
-#define LOG3(args) MOZ_LOG(gHttpLog, 3, args)
-#define LOG4(args) MOZ_LOG(gHttpLog, 4, args)
-#define LOG5(args) MOZ_LOG(gHttpLog, 5, args)
+#define LOG1(args) MOZ_LOG(gHttpLog, PR_LOG_ERROR, args)
+#define LOG2(args) MOZ_LOG(gHttpLog, PR_LOG_WARNING, args)
+#define LOG3(args) MOZ_LOG(gHttpLog, PR_LOG_INFO, args)
+#define LOG4(args) MOZ_LOG(gHttpLog, PR_LOG_DEBUG, args)
+#define LOG5(args) MOZ_LOG(gHttpLog, PR_LOG_VERBOSE, args)
 #define LOG(args) LOG4(args)
 
-#define LOG1_ENABLED() MOZ_LOG_TEST(gHttpLog, 1)
-#define LOG2_ENABLED() MOZ_LOG_TEST(gHttpLog, 2)
-#define LOG3_ENABLED() MOZ_LOG_TEST(gHttpLog, 3)
-#define LOG4_ENABLED() MOZ_LOG_TEST(gHttpLog, 4)
-#define LOG5_ENABLED() MOZ_LOG_TEST(gHttpLog, 5)
+#define LOG1_ENABLED() MOZ_LOG_TEST(gHttpLog, PR_LOG_ERROR)
+#define LOG2_ENABLED() MOZ_LOG_TEST(gHttpLog, PR_LOG_WARNING)
+#define LOG3_ENABLED() MOZ_LOG_TEST(gHttpLog, PR_LOG_INFO)
+#define LOG4_ENABLED() MOZ_LOG_TEST(gHttpLog, PR_LOG_DEBUG)
+#define LOG5_ENABLED() MOZ_LOG_TEST(gHttpLog, PR_LOG_VERBOSE)
 #define LOG_ENABLED() LOG4_ENABLED()
 
 #endif // HttpLog_h__
--- a/netwerk/protocol/http/nsHttpConnectionInfo.h
+++ b/netwerk/protocol/http/nsHttpConnectionInfo.h
@@ -49,17 +49,17 @@ public:
                          const nsACString &username,
                          nsProxyInfo *proxyInfo,
                          const nsACString &routedHost,
                          int32_t routedPort);
 
 private:
     virtual ~nsHttpConnectionInfo()
     {
-        MOZ_LOG(gHttpLog, 4, ("Destroying nsHttpConnectionInfo @%x\n", this));
+        MOZ_LOG(gHttpLog, PR_LOG_DEBUG, ("Destroying nsHttpConnectionInfo @%x\n", this));
     }
 
     void BuildHashKey();
 
 public:
     const nsAFlatCString &HashKey() const { return mHashKey; }
 
     const nsCString &GetOrigin() const { return mOrigin; }
--- a/netwerk/protocol/wyciwyg/nsWyciwyg.h
+++ b/netwerk/protocol/wyciwyg/nsWyciwyg.h
@@ -21,23 +21,23 @@
 //    set NSPR_LOG_FILE=wyciwyg.log
 //
 // this enables PR_LOG_DEBUG level information and places all output in
 // the file wyciwyg.log
 //
 extern PRLogModuleInfo *gWyciwygLog;
 
 // http logging
-#define LOG1(args) MOZ_LOG(gWyciwygLog, 1, args)
-#define LOG2(args) MOZ_LOG(gWyciwygLog, 2, args)
-#define LOG3(args) MOZ_LOG(gWyciwygLog, 3, args)
-#define LOG4(args) MOZ_LOG(gWyciwygLog, 4, args)
+#define LOG1(args) MOZ_LOG(gWyciwygLog, PR_LOG_ERROR, args)
+#define LOG2(args) MOZ_LOG(gWyciwygLog, PR_LOG_WARNING, args)
+#define LOG3(args) MOZ_LOG(gWyciwygLog, PR_LOG_INFO, args)
+#define LOG4(args) MOZ_LOG(gWyciwygLog, PR_LOG_DEBUG, args)
 #define LOG(args) LOG4(args)
 
-#define LOG1_ENABLED() MOZ_LOG_TEST(gWyciwygLog, 1)
-#define LOG2_ENABLED() MOZ_LOG_TEST(gWyciwygLog, 2)
-#define LOG3_ENABLED() MOZ_LOG_TEST(gWyciwygLog, 3)
-#define LOG4_ENABLED() MOZ_LOG_TEST(gWyciwygLog, 4)
+#define LOG1_ENABLED() MOZ_LOG_TEST(gWyciwygLog, PR_LOG_ERROR)
+#define LOG2_ENABLED() MOZ_LOG_TEST(gWyciwygLog, PR_LOG_WARNING)
+#define LOG3_ENABLED() MOZ_LOG_TEST(gWyciwygLog, PR_LOG_INFO)
+#define LOG4_ENABLED() MOZ_LOG_TEST(gWyciwygLog, PR_LOG_DEBUG)
 #define LOG_ENABLED() LOG4_ENABLED()
 
 #define WYCIWYG_TYPE "text/html"
 
 #endif // nsWyciwyg_h__
--- a/security/manager/ssl/nsSiteSecurityService.cpp
+++ b/security/manager/ssl/nsSiteSecurityService.cpp
@@ -44,17 +44,17 @@ static PRLogModuleInfo *
 GetSSSLog()
 {
   static PRLogModuleInfo *gSSSLog;
   if (!gSSSLog)
     gSSSLog = PR_NewLogModule("nsSSService");
   return gSSSLog;
 }
 
-#define SSSLOG(args) MOZ_LOG(GetSSSLog(), 4, args)
+#define SSSLOG(args) MOZ_LOG(GetSSSLog(), PR_LOG_DEBUG, args)
 
 ////////////////////////////////////////////////////////////////////////////////
 
 SiteHSTSState::SiteHSTSState(nsCString& aStateString)
   : mHSTSExpireTime(0)
   , mHSTSState(SecurityPropertyUnset)
   , mHSTSIncludeSubdomains(false)
 {
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -123,18 +123,18 @@ enum {
 };
 
 PRLogModuleInfo* nsExternalHelperAppService::mLog = nullptr;
 
 // Using level 3 here because the OSHelperAppServices use a log level
 // of PR_LOG_DEBUG (4), and we want less detailed output here
 // Using 3 instead of PR_LOG_WARN because we don't output warnings
 #undef LOG
-#define LOG(args) MOZ_LOG(nsExternalHelperAppService::mLog, 3, args)
-#define LOG_ENABLED() MOZ_LOG_TEST(nsExternalHelperAppService::mLog, 3)
+#define LOG(args) MOZ_LOG(nsExternalHelperAppService::mLog, PR_LOG_INFO, args)
+#define LOG_ENABLED() MOZ_LOG_TEST(nsExternalHelperAppService::mLog, PR_LOG_INFO)
 
 static const char NEVER_ASK_FOR_SAVE_TO_DISK_PREF[] =
   "browser.helperApps.neverAsk.saveToDisk";
 static const char NEVER_ASK_FOR_OPEN_FILE_PREF[] =
   "browser.helperApps.neverAsk.openFile";
 
 // Helper functions for Content-Disposition headers
 
--- a/uriloader/prefetch/OfflineCacheUpdateChild.cpp
+++ b/uriloader/prefetch/OfflineCacheUpdateChild.cpp
@@ -43,20 +43,20 @@ using mozilla::dom::ContentChild;
 //    set NSPR_LOG_FILE=offlineupdate.log
 //
 // this enables PR_LOG_DEBUG level information and places all output in
 // the file offlineupdate.log
 //
 extern PRLogModuleInfo *gOfflineCacheUpdateLog;
 
 #undef LOG
-#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, 4, args)
+#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, PR_LOG_DEBUG, args)
 
 #undef LOG_ENABLED
-#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, 4)
+#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, PR_LOG_DEBUG)
 
 namespace mozilla {
 namespace docshell {
 
 //-----------------------------------------------------------------------------
 // OfflineCacheUpdateChild::nsISupports
 //-----------------------------------------------------------------------------
 
--- a/uriloader/prefetch/OfflineCacheUpdateGlue.cpp
+++ b/uriloader/prefetch/OfflineCacheUpdateGlue.cpp
@@ -21,20 +21,20 @@
 //    set NSPR_LOG_FILE=offlineupdate.log
 //
 // this enables PR_LOG_INFO level information and places all output in
 // the file offlineupdate.log
 //
 extern PRLogModuleInfo *gOfflineCacheUpdateLog;
 
 #undef LOG
-#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, 4, args)
+#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, PR_LOG_DEBUG, args)
 
 #undef LOG_ENABLED
-#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, 4)
+#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, PR_LOG_DEBUG)
 
 namespace mozilla {
 namespace docshell {
 
 //-----------------------------------------------------------------------------
 // OfflineCacheUpdateGlue::nsISupports
 //-----------------------------------------------------------------------------
 
--- a/uriloader/prefetch/OfflineCacheUpdateParent.cpp
+++ b/uriloader/prefetch/OfflineCacheUpdateParent.cpp
@@ -24,20 +24,20 @@ using mozilla::dom::TabParent;
 //    set NSPR_LOG_FILE=offlineupdate.log
 //
 // this enables PR_LOG_DEBUG level information and places all output in
 // the file offlineupdate.log
 //
 extern PRLogModuleInfo *gOfflineCacheUpdateLog;
 
 #undef LOG
-#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, 4, args)
+#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, PR_LOG_DEBUG, args)
 
 #undef LOG_ENABLED
-#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, 4)
+#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, PR_LOG_DEBUG)
 
 namespace mozilla {
 namespace docshell {
 
 //-----------------------------------------------------------------------------
 // OfflineCacheUpdateParent::nsISupports
 //-----------------------------------------------------------------------------
 
--- a/uriloader/prefetch/nsOfflineCacheUpdate.cpp
+++ b/uriloader/prefetch/nsOfflineCacheUpdate.cpp
@@ -58,20 +58,20 @@ static const int32_t  kCustomProfileQuot
 //    set NSPR_LOG_FILE=offlineupdate.log
 //
 // this enables PR_LOG_DEBUG level information and places all output in
 // the file offlineupdate.log
 //
 extern PRLogModuleInfo *gOfflineCacheUpdateLog;
 
 #undef LOG
-#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, 4, args)
+#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, PR_LOG_DEBUG, args)
 
 #undef LOG_ENABLED
-#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, 4)
+#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, PR_LOG_DEBUG)
 
 class AutoFreeArray {
 public:
     AutoFreeArray(uint32_t count, char **values)
         : mCount(count), mValues(values) {};
     ~AutoFreeArray() { NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(mCount, mValues); }
 private:
     uint32_t mCount;
--- a/uriloader/prefetch/nsOfflineCacheUpdateService.cpp
+++ b/uriloader/prefetch/nsOfflineCacheUpdateService.cpp
@@ -77,20 +77,20 @@ typedef mozilla::docshell::OfflineCacheU
 //    set NSPR_LOG_FILE=offlineupdate.log
 //
 // this enables PR_LOG_DEBUG level information and places all output in
 // the file offlineupdate.log
 //
 PRLogModuleInfo *gOfflineCacheUpdateLog;
 
 #undef LOG
-#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, 4, args)
+#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, PR_LOG_DEBUG, args)
 
 #undef LOG_ENABLED
-#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, 4)
+#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, PR_LOG_DEBUG)
 
 namespace { // anon
 
 nsresult
 GetAppIDAndInBrowserFromWindow(nsIDOMWindow *aWindow,
                                uint32_t *aAppId,
                                bool *aInBrowser)
 {
--- a/uriloader/prefetch/nsPrefetchService.cpp
+++ b/uriloader/prefetch/nsPrefetchService.cpp
@@ -39,20 +39,20 @@ using namespace mozilla;
 //    set NSPR_LOG_FILE=prefetch.log
 //
 // this enables PR_LOG_DEBUG level information and places all output in
 // the file http.log
 //
 static PRLogModuleInfo *gPrefetchLog;
 
 #undef LOG
-#define LOG(args) MOZ_LOG(gPrefetchLog, 4, args)
+#define LOG(args) MOZ_LOG(gPrefetchLog, PR_LOG_DEBUG, args)
 
 #undef LOG_ENABLED
-#define LOG_ENABLED() MOZ_LOG_TEST(gPrefetchLog, 4)
+#define LOG_ENABLED() MOZ_LOG_TEST(gPrefetchLog, PR_LOG_DEBUG)
 
 #define PREFETCH_PREF "network.prefetch-next"
 
 //-----------------------------------------------------------------------------
 // helpers
 //-----------------------------------------------------------------------------
 
 static inline uint32_t
--- a/widget/gtk/nsWindow.h
+++ b/widget/gtk/nsWindow.h
@@ -40,20 +40,20 @@
 #include "nsTArray.h"
 #include "Units.h"
 
 extern PRLogModuleInfo *gWidgetLog;
 extern PRLogModuleInfo *gWidgetFocusLog;
 extern PRLogModuleInfo *gWidgetDragLog;
 extern PRLogModuleInfo *gWidgetDrawLog;
 
-#define LOG(args) MOZ_LOG(gWidgetLog, 4, args)
-#define LOGFOCUS(args) MOZ_LOG(gWidgetFocusLog, 4, args)
-#define LOGDRAG(args) MOZ_LOG(gWidgetDragLog, 4, args)
-#define LOGDRAW(args) MOZ_LOG(gWidgetDrawLog, 4, args)
+#define LOG(args) MOZ_LOG(gWidgetLog, PR_LOG_DEBUG, args)
+#define LOGFOCUS(args) MOZ_LOG(gWidgetFocusLog, PR_LOG_DEBUG, args)
+#define LOGDRAG(args) MOZ_LOG(gWidgetDragLog, PR_LOG_DEBUG, args)
+#define LOGDRAW(args) MOZ_LOG(gWidgetDrawLog, PR_LOG_DEBUG, args)
 
 #else
 
 #define LOG(args)
 #define LOGFOCUS(args)
 #define LOGDRAG(args)
 #define LOGDRAW(args)
 
--- a/widget/qt/nsWindow.h
+++ b/widget/qt/nsWindow.h
@@ -24,20 +24,20 @@
 #include "mozilla/Logging.h"
 #include "nsTArray.h"
 
 extern PRLogModuleInfo *gWidgetLog;
 extern PRLogModuleInfo *gWidgetFocusLog;
 extern PRLogModuleInfo *gWidgetIMLog;
 extern PRLogModuleInfo *gWidgetDrawLog;
 
-#define LOG(args) MOZ_LOG(gWidgetLog, 4, args)
-#define LOGFOCUS(args) MOZ_LOG(gWidgetFocusLog, 4, args)
-#define LOGIM(args) MOZ_LOG(gWidgetIMLog, 4, args)
-#define LOGDRAW(args) MOZ_LOG(gWidgetDrawLog, 4, args)
+#define LOG(args) MOZ_LOG(gWidgetLog, PR_LOG_DEBUG, args)
+#define LOGFOCUS(args) MOZ_LOG(gWidgetFocusLog, PR_LOG_DEBUG, args)
+#define LOGIM(args) MOZ_LOG(gWidgetIMLog, PR_LOG_DEBUG, args)
+#define LOGDRAW(args) MOZ_LOG(gWidgetDrawLog, PR_LOG_DEBUG, args)
 
 #else
 
 #ifdef DEBUG_WIDGETS
 
 #define PR_LOG2(_args)         \
     PR_BEGIN_MACRO             \
       qDebug _args;            \