Bug 1244091 - Switch nsUpdateDriver to LazyLogModule. r=froydnj
authorEric Rahm <erahm@mozilla.com>
Mon, 03 Apr 2017 18:36:18 -0700
changeset 555414 b3b4cf61e1479b86f448c3790883956b9a06740b
parent 555413 6d446e9be0749c744f80370d63287e6316d15766
child 555415 d411840d6206cb515a20bcb60b5d4f8eb0f1335b
push id52236
push usercykesiopka.bmo@gmail.com
push dateTue, 04 Apr 2017 09:12:57 +0000
reviewersfroydnj
bugs1244091
milestone55.0a1
Bug 1244091 - Switch nsUpdateDriver to LazyLogModule. r=froydnj
toolkit/xre/nsUpdateDriver.cpp
--- a/toolkit/xre/nsUpdateDriver.cpp
+++ b/toolkit/xre/nsUpdateDriver.cpp
@@ -45,25 +45,18 @@
 # define getpid() GetCurrentProcessId()
 #elif defined(XP_UNIX)
 # include <unistd.h>
 # include <sys/wait.h>
 #endif
 
 using namespace mozilla;
 
-static PRLogModuleInfo *
-GetUpdateLog()
-{
-  static PRLogModuleInfo *sUpdateLog;
-  if (!sUpdateLog)
-    sUpdateLog = PR_NewLogModule("updatedriver");
-  return sUpdateLog;
-}
-#define LOG(args) MOZ_LOG(GetUpdateLog(), mozilla::LogLevel::Debug, args)
+static LazyLogModule sUpdateLog("updatedriver");
+#define LOG(args) MOZ_LOG(sUpdateLog, mozilla::LogLevel::Debug, args)
 
 #ifdef XP_WIN
 #define UPDATER_BIN "updater.exe"
 #elif XP_MACOSX
 #define UPDATER_BIN "org.mozilla.updater"
 #else
 #define UPDATER_BIN "updater"
 #endif