Bug 1165515 - Part 1: Convert PR_LOG to MOZ_LOG. r=froydnj
authorEric Rahm <erahm@mozilla.com>
Thu, 21 May 2015 13:22:04 -0700
changeset 277453 8a03e892db51e07a20a85f97abe073cee7be0fa0
parent 277452 bd180fa25240ad9a6c7c74999550b27fc9e2fb97
child 277454 2661dabba07444905c2b56b9c0891a47a7edcb37
push id897
push userjlund@mozilla.com
push dateMon, 14 Sep 2015 18:56:12 +0000
treeherdermozilla-release@9411e2d2b214 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1165515
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1165515 - Part 1: Convert PR_LOG to MOZ_LOG. r=froydnj
docshell/base/nsDocShell.cpp
docshell/shistory/nsSHistory.cpp
dom/base/ThirdPartyUtil.cpp
dom/base/nsContentPolicy.cpp
dom/base/nsDOMDataChannel.cpp
dom/base/nsDocument.cpp
dom/base/nsFocusManager.cpp
dom/base/nsGlobalWindow.cpp
dom/base/nsNodeInfoManager.cpp
dom/base/nsObjectLoadingContent.cpp
dom/camera/CameraCommon.h
dom/events/IMEStateManager.cpp
dom/html/HTMLMediaElement.cpp
dom/html/HTMLTrackElement.cpp
dom/indexedDB/ActorsParent.cpp
dom/indexedDB/ProfilerHelpers.h
dom/ipc/ProcessPriorityManager.cpp
dom/media/AudioSink.cpp
dom/media/AudioStream.cpp
dom/media/GraphDriver.cpp
dom/media/Latency.cpp
dom/media/MediaCache.cpp
dom/media/MediaDecoder.cpp
dom/media/MediaDecoderReader.cpp
dom/media/MediaDecoderStateMachine.cpp
dom/media/MediaFormatReader.cpp
dom/media/MediaManager.cpp
dom/media/MediaManager.h
dom/media/MediaPromise.h
dom/media/MediaRecorder.cpp
dom/media/MediaResource.cpp
dom/media/MediaShutdownManager.cpp
dom/media/MediaStreamGraph.cpp
dom/media/MediaTimer.h
dom/media/RtspMediaResource.cpp
dom/media/StateMirroring.h
dom/media/StateWatching.h
dom/media/StreamBuffer.cpp
dom/media/TrackUnionStream.cpp
dom/media/WebVTTListener.cpp
dom/media/apple/AppleMP3Reader.cpp
dom/media/directshow/AudioSinkFilter.cpp
dom/media/directshow/AudioSinkInputPin.cpp
dom/media/directshow/DirectShowReader.cpp
dom/media/directshow/SampleSink.cpp
dom/media/directshow/SourceFilter.cpp
dom/media/eme/EMEUtils.h
dom/media/encoder/MediaEncoder.cpp
dom/media/encoder/TrackEncoder.cpp
dom/media/encoder/VP8TrackEncoder.cpp
dom/media/encoder/VorbisTrackEncoder.cpp
dom/media/fmp4/MP4Reader.cpp
dom/media/gmp/GMPAudioDecoderParent.cpp
dom/media/gmp/GMPChild.cpp
dom/media/gmp/GMPContentParent.cpp
dom/media/gmp/GMPParent.cpp
dom/media/gmp/GMPService.cpp
dom/media/gmp/GMPServiceChild.cpp
dom/media/gmp/GMPServiceParent.cpp
dom/media/gmp/GMPStorageParent.cpp
dom/media/gmp/GMPTimerParent.cpp
dom/media/gmp/GMPVideoDecoderParent.cpp
dom/media/gmp/GMPVideoEncoderParent.cpp
dom/media/gstreamer/GStreamerReader.cpp
dom/media/imagecapture/ImageCapture.h
dom/media/mediasource/ContainerParser.cpp
dom/media/mediasource/MediaSource.cpp
dom/media/mediasource/MediaSourceDecoder.cpp
dom/media/mediasource/MediaSourceReader.cpp
dom/media/mediasource/MediaSourceResource.h
dom/media/mediasource/ResourceQueue.cpp
dom/media/mediasource/SourceBuffer.cpp
dom/media/mediasource/SourceBufferDecoder.cpp
dom/media/mediasource/SourceBufferList.cpp
dom/media/mediasource/SourceBufferResource.cpp
dom/media/mediasource/TrackBuffer.cpp
dom/media/ogg/OggCodecState.cpp
dom/media/ogg/OggReader.cpp
dom/media/ogg/OpusParser.cpp
dom/media/omx/AudioOffloadPlayer.cpp
dom/media/omx/AudioOutput.cpp
dom/media/omx/I420ColorConverterHelper.cpp
dom/media/omx/MediaOmxCommonDecoder.cpp
dom/media/omx/MediaOmxCommonReader.cpp
dom/media/omx/MediaOmxReader.cpp
dom/media/omx/OmxDecoder.cpp
dom/media/platforms/apple/AppleATDecoder.cpp
dom/media/platforms/apple/AppleCMLinker.cpp
dom/media/platforms/apple/AppleVDADecoder.cpp
dom/media/platforms/apple/AppleVDALinker.cpp
dom/media/platforms/apple/AppleVTDecoder.cpp
dom/media/platforms/apple/AppleVTLinker.cpp
dom/media/platforms/ffmpeg/FFmpegLog.h
dom/media/platforms/gonk/GonkAudioDecoderManager.cpp
dom/media/platforms/gonk/GonkMediaDataDecoder.cpp
dom/media/platforms/gonk/GonkVideoDecoderManager.cpp
dom/media/platforms/wmf/MFTDecoder.cpp
dom/media/platforms/wmf/WMFAudioMFTManager.cpp
dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
dom/media/platforms/wmf/WMFVideoMFTManager.cpp
dom/media/systemservices/LoadManager.cpp
dom/media/systemservices/LoadMonitor.cpp
dom/media/systemservices/MediaChild.cpp
dom/media/systemservices/MediaParent.cpp
dom/media/systemservices/OpenSLESProvider.cpp
dom/media/wave/WaveReader.cpp
dom/media/webm/IntelWebMVideoDecoder.cpp
dom/media/webm/WebMReader.cpp
dom/media/webrtc/MediaEngineCameraVideoSource.cpp
dom/media/webrtc/MediaEngineGonkVideoSource.cpp
dom/media/webrtc/MediaEngineWebRTC.cpp
dom/media/webrtc/MediaEngineWebRTCAudio.cpp
dom/media/webrtc/MediaEngineWebRTCVideo.cpp
dom/media/webspeech/recognition/SpeechRecognition.cpp
dom/media/webspeech/recognition/SpeechRecognition.h
dom/media/webspeech/synth/SpeechSynthesis.cpp
dom/media/webspeech/synth/nsSpeechTask.cpp
dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
dom/media/wmf/WMFByteStream.cpp
dom/media/wmf/WMFReader.cpp
dom/media/wmf/WMFSourceReaderCallback.cpp
dom/plugins/base/nsNPAPIPlugin.cpp
dom/plugins/base/nsPluginHost.cpp
dom/plugins/base/nsPluginLogging.h
dom/plugins/base/nsPluginStreamListenerPeer.cpp
dom/plugins/ipc/PluginInstanceChild.cpp
dom/plugins/ipc/PluginInstanceParent.cpp
dom/plugins/ipc/PluginMessageUtils.h
dom/plugins/ipc/PluginModuleParent.cpp
dom/security/nsCSPContext.cpp
dom/security/nsCSPParser.cpp
dom/security/nsCSPService.cpp
dom/security/nsCSPUtils.cpp
dom/xslt/xslt/txExecutionState.cpp
dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
dom/xslt/xslt/txMozillaXMLOutput.cpp
dom/xslt/xslt/txStylesheet.cpp
dom/xslt/xslt/txStylesheetCompiler.cpp
dom/xul/XULDocument.cpp
dom/xul/nsXULCommandDispatcher.cpp
dom/xul/nsXULContentSink.cpp
dom/xul/templates/nsContentTestNode.cpp
dom/xul/templates/nsInstantiationNode.cpp
dom/xul/templates/nsRDFConInstanceTestNode.cpp
dom/xul/templates/nsRDFConMemberTestNode.cpp
dom/xul/templates/nsRDFPropertyTestNode.cpp
dom/xul/templates/nsRuleNetwork.cpp
dom/xul/templates/nsXULContentBuilder.cpp
dom/xul/templates/nsXULContentUtils.cpp
dom/xul/templates/nsXULTemplateBuilder.cpp
dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp
dom/xul/templates/nsXULTreeBuilder.cpp
extensions/auth/nsAuth.h
extensions/gio/nsGIOProtocolHandler.cpp
extensions/pref/autoconfig/src/nsAutoConfig.cpp
extensions/pref/autoconfig/src/nsReadConfig.cpp
gfx/layers/LayersTypes.h
gfx/thebes/gfxDWriteFontList.cpp
gfx/thebes/gfxFT2FontList.cpp
gfx/thebes/gfxFcPlatformFontList.cpp
gfx/thebes/gfxFont.cpp
gfx/thebes/gfxFontEntry.cpp
gfx/thebes/gfxFontUtils.cpp
gfx/thebes/gfxGDIFontList.cpp
gfx/thebes/gfxMacPlatformFontList.mm
gfx/thebes/gfxPlatformFontList.cpp
gfx/thebes/gfxTextRun.cpp
gfx/thebes/gfxUserFontSet.cpp
hal/HalLog.h
image/ImageLogging.h
image/decoders/nsBMPDecoder.cpp
image/decoders/nsJPEGDecoder.cpp
image/decoders/nsPNGDecoder.cpp
image/encoders/png/nsPNGEncoder.cpp
image/imgLoader.cpp
image/imgRequest.cpp
js/xpconnect/loader/mozJSComponentLoader.cpp
js/xpconnect/src/nsXPConnect.cpp
layout/base/AccessibleCaretLogger.h
layout/base/SelectionCarets.cpp
layout/base/TouchCaret.cpp
layout/base/nsDocumentViewer.cpp
layout/base/nsPresShell.cpp
layout/base/nsRefreshDriver.cpp
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsPageFrame.cpp
layout/generic/nsPluginFrame.cpp
layout/generic/nsSimplePageSequenceFrame.cpp
layout/printing/nsPrintData.cpp
layout/printing/nsPrintEngine.cpp
layout/style/FontFaceSet.cpp
layout/style/Loader.cpp
layout/style/nsFontFaceLoader.cpp
media/libstagefright/binding/MoofParser.cpp
media/mtransport/logging.h
media/webrtc/signaling/src/common/browser_logging/CSFLog.cpp
media/webrtc/signaling/src/common/browser_logging/WebRtcLog.cpp
media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
modules/libjar/nsJARChannel.cpp
netwerk/base/BackgroundFileSaver.cpp
netwerk/base/Predictor.cpp
netwerk/base/nsAsyncRedirectVerifyHelper.cpp
netwerk/base/nsAsyncStreamCopier.cpp
netwerk/base/nsAutodialWin.cpp
netwerk/base/nsChannelClassifier.cpp
netwerk/base/nsDirectoryIndexStream.cpp
netwerk/base/nsInputStreamPump.cpp
netwerk/base/nsLoadGroup.cpp
netwerk/base/nsPACMan.cpp
netwerk/base/nsProtocolProxyService.cpp
netwerk/base/nsRequestObserverProxy.cpp
netwerk/base/nsSocketTransportService2.h
netwerk/base/nsStandardURL.cpp
netwerk/cache/nsCache.cpp
netwerk/cache/nsCache.h
netwerk/cache2/CacheLog.h
netwerk/cookie/nsCookieService.cpp
netwerk/dns/GetAddrInfo.cpp
netwerk/dns/nsHostResolver.cpp
netwerk/protocol/ftp/FTPChannelChild.cpp
netwerk/protocol/ftp/FTPChannelParent.cpp
netwerk/protocol/ftp/nsFtpConnectionThread.cpp
netwerk/protocol/ftp/nsFtpControlConnection.cpp
netwerk/protocol/ftp/nsFtpProtocolHandler.cpp
netwerk/protocol/http/HttpBaseChannel.h
netwerk/protocol/http/HttpLog.h
netwerk/protocol/http/nsHttpConnectionInfo.h
netwerk/protocol/res/nsResProtocolHandler.cpp
netwerk/protocol/rtsp/controller/RtspController.cpp
netwerk/protocol/rtsp/controller/RtspControllerChild.cpp
netwerk/protocol/rtsp/controller/RtspControllerParent.cpp
netwerk/protocol/rtsp/rtsp/RtspPrlog.h
netwerk/protocol/websocket/WebSocketLog.h
netwerk/protocol/wyciwyg/nsWyciwyg.h
netwerk/sctp/datachannel/DataChannelLog.h
netwerk/socket/nsSOCKSIOLayer.cpp
netwerk/streamconv/converters/nsFTPDirListingConv.cpp
netwerk/system/linux/nsNotifyAddrListener_Linux.cpp
netwerk/system/win32/nsNotifyAddrListener.cpp
netwerk/test/TestBlockingSocket.cpp
netwerk/test/TestIOThreads.cpp
netwerk/test/TestOverlappedIO.cpp
netwerk/test/TestProtocols.cpp
netwerk/test/TestServ.cpp
netwerk/test/TestSocketIO.cpp
netwerk/test/TestSocketTransport.cpp
netwerk/test/TestStreamChannel.cpp
netwerk/test/TestStreamLoader.cpp
netwerk/test/TestStreamPump.cpp
netwerk/test/TestStreamTransport.cpp
netwerk/test/TestUpload.cpp
netwerk/wifi/nsWifiAccessPoint.cpp
netwerk/wifi/nsWifiMonitor.h
parser/htmlparser/nsExpatDriver.cpp
rdf/base/nsInMemoryDataSource.cpp
rdf/base/nsRDFContentSink.cpp
rdf/base/nsRDFService.cpp
rdf/base/nsRDFXMLDataSource.cpp
security/apps/AppSignatureVerification.cpp
security/certverifier/CertVerifier.cpp
security/certverifier/NSSCertDBTrustDomain.cpp
security/certverifier/OCSPCache.cpp
security/certverifier/OCSPRequestor.cpp
security/manager/boot/src/CertBlocklist.cpp
security/manager/boot/src/PublicKeyPinningService.cpp
security/manager/boot/src/RootCertificateTelemetryUtils.cpp
security/manager/boot/src/nsSecureBrowserUIImpl.cpp
security/manager/boot/src/nsSecurityHeaderParser.cpp
security/manager/boot/src/nsSiteSecurityService.cpp
security/manager/ssl/src/PSMContentListener.cpp
security/manager/ssl/src/SSLServerCertVerification.cpp
security/manager/ssl/src/nsCertTree.cpp
security/manager/ssl/src/nsNSSCallbacks.cpp
security/manager/ssl/src/nsNSSCertificate.cpp
security/manager/ssl/src/nsNSSCertificateDB.cpp
security/manager/ssl/src/nsNSSComponent.cpp
security/manager/ssl/src/nsNSSIOLayer.cpp
security/manager/ssl/src/nsNSSShutDown.cpp
security/manager/ssl/src/nsNTLMAuthModule.cpp
security/manager/ssl/src/nsPKCS11Slot.cpp
security/manager/ssl/src/nsPKCS12Blob.cpp
security/manager/ssl/src/nsUsageArrayHelper.cpp
storage/VacuumManager.cpp
storage/mozStorageAsyncStatement.cpp
storage/mozStorageConnection.cpp
storage/mozStorageStatement.cpp
toolkit/components/downloads/ApplicationReputation.cpp
toolkit/components/filewatcher/NativeFileWatcherWin.cpp
toolkit/components/url-classifier/Classifier.cpp
toolkit/components/url-classifier/HashStore.cpp
toolkit/components/url-classifier/LookupCache.cpp
toolkit/components/url-classifier/ProtocolParser.cpp
toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp
toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp
toolkit/xre/nsUpdateDriver.cpp
uriloader/base/nsDocLoader.cpp
uriloader/base/nsURILoader.cpp
uriloader/exthandler/mac/nsOSHelperAppService.mm
uriloader/exthandler/nsExternalHelperAppService.cpp
uriloader/exthandler/unix/nsOSHelperAppService.cpp
uriloader/exthandler/win/nsOSHelperAppService.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/cocoa/NativeKeyBindings.mm
widget/cocoa/TextInputHandler.mm
widget/cocoa/nsChildView.mm
widget/cocoa/nsClipboard.mm
widget/cocoa/nsDragService.mm
widget/gtk/nsDeviceContextSpecG.cpp
widget/gtk/nsDragService.cpp
widget/gtk/nsGtkIMModule.cpp
widget/gtk/nsGtkKeyUtils.cpp
widget/gtk/nsIdleServiceGTK.cpp
widget/gtk/nsWindow.h
widget/nsIdleService.cpp
widget/qt/nsDeviceContextSpecQt.cpp
widget/qt/nsWindow.h
widget/windows/KeyboardLayout.cpp
widget/windows/WinMouseScrollHandler.cpp
widget/windows/WinUtils.cpp
widget/windows/nsClipboard.cpp
widget/windows/nsDataObj.cpp
widget/windows/nsDeviceContextSpecWin.cpp
widget/windows/nsIMM32Handler.cpp
widget/windows/nsNativeThemeWin.cpp
widget/windows/nsSound.cpp
widget/windows/nsTextStore.cpp
widget/windows/nsWinGesture.cpp
widget/windows/nsWindow.cpp
widget/windows/nsWindowDbg.cpp
widget/windows/nsWindowDbg.h
widget/xremoteclient/XRemoteClient.cpp
xpcom/base/nsDebugImpl.cpp
xpcom/base/nsTraceRefcnt.cpp
xpcom/build/perfprobe.cpp
xpcom/components/nsComponentManager.cpp
xpcom/components/nsNativeModuleLoader.cpp
xpcom/ds/TimeStamp_windows.cpp
xpcom/ds/nsObserverService.cpp
xpcom/io/nsInputStreamTee.cpp
xpcom/io/nsPipe3.cpp
xpcom/io/nsStorageStream.cpp
xpcom/threads/TimerThread.cpp
xpcom/threads/nsEventQueue.cpp
xpcom/threads/nsThread.cpp
xpcom/threads/nsThreadPool.cpp
xpcom/threads/nsTimerImpl.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -921,17 +921,17 @@ nsDocShell::nsDocShell()
   if (!gDocShellLog) {
     gDocShellLog = PR_NewLogModule("nsDocShell");
   }
 #endif
   if (!gDocShellLeakLog) {
     gDocShellLeakLog = PR_NewLogModule("nsDocShellLeak");
   }
   if (gDocShellLeakLog) {
-    PR_LOG(gDocShellLeakLog, PR_LOG_DEBUG, ("DOCSHELL %p created\n", this));
+    MOZ_LOG(gDocShellLeakLog, PR_LOG_DEBUG, ("DOCSHELL %p created\n", this));
   }
 
 #ifdef DEBUG
   // We're counting the number of |nsDocShells| to help find leaks
   ++gNumberOfDocShells;
   if (!PR_GetEnv("MOZ_QUIET")) {
     printf_stderr("++DOCSHELL %p == %ld [pid = %d] [id = %llu]\n",
                   (void*)this,
@@ -953,17 +953,17 @@ nsDocShell::~nsDocShell()
     shPrivate->SetRootDocShell(nullptr);
   }
 
   if (--gDocShellCount == 0) {
     NS_IF_RELEASE(sURIFixup);
   }
 
   if (gDocShellLeakLog) {
-    PR_LOG(gDocShellLeakLog, PR_LOG_DEBUG, ("DOCSHELL %p destroyed\n", this));
+    MOZ_LOG(gDocShellLeakLog, PR_LOG_DEBUG, ("DOCSHELL %p destroyed\n", this));
   }
 
 #ifdef DEBUG
   // We're counting the number of |nsDocShells| to help find leaks
   --gNumberOfDocShells;
   if (!PR_GetEnv("MOZ_QUIET")) {
     printf_stderr("--DOCSHELL %p == %ld [pid = %d] [id = %llu]\n",
                   (void*)this,
@@ -1090,17 +1090,17 @@ nsDocShell::GetInterface(const nsIID& aI
     nsCOMPtr<nsIDOMDocument> domDoc;
     contentViewer->GetDOMDocument(getter_AddRefs(domDoc));
     NS_ASSERTION(domDoc, "Should have a document.");
     if (!domDoc) {
       return NS_ERROR_NO_INTERFACE;
     }
 
 #if defined(DEBUG)
-    PR_LOG(gDocShellLog, PR_LOG_DEBUG,
+    MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
            ("nsDocShell[%p]: returning app cache container %p",
             this, domDoc.get()));
 #endif
     return domDoc->QueryInterface(aIID, aSink);
   } else if (aIID.Equals(NS_GET_IID(nsIPrompt)) &&
              NS_SUCCEEDED(EnsureScriptEnvironment())) {
     nsresult rv;
     nsCOMPtr<nsIWindowWatcher> wwatch =
@@ -1416,17 +1416,17 @@ nsDocShell::LoadURI(nsIURI* aURI,
     aLoadInfo->GetSourceDocShell(getter_AddRefs(sourceDocShell));
     aLoadInfo->GetBaseURI(getter_AddRefs(baseURI));
   }
 
 #if defined(DEBUG)
   if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
     nsAutoCString uristr;
     aURI->GetAsciiSpec(uristr);
-    PR_LOG(gDocShellLog, PR_LOG_DEBUG,
+    MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
            ("nsDocShell[%p]: loading %s with flags 0x%08x",
             this, uristr.get(), aLoadFlags));
   }
 #endif
 
   if (!shEntry &&
       !LOAD_TYPE_HAS_FLAGS(loadType, LOAD_FLAGS_REPLACE_HISTORY)) {
     // First verify if this is a subframe.
@@ -1535,17 +1535,17 @@ nsDocShell::LoadURI(nsIURI* aURI,
       if (inOnLoadHandler) {
         loadType = LOAD_NORMAL_REPLACE;
       }
     }
   } // !shEntry
 
   if (shEntry) {
 #ifdef DEBUG
-    PR_LOG(gDocShellLog, PR_LOG_DEBUG,
+    MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
            ("nsDocShell[%p]: loading from session history", this));
 #endif
 
     return LoadHistoryEntry(shEntry, loadType);
   }
 
   // On history navigation via Back/Forward buttons, don't execute
   // automatic JavaScript redirection such as |location.href = ...| or
@@ -5308,17 +5308,17 @@ nsDocShell::LoadErrorPage(nsIURI* aURI, 
 
     nsAutoCString chanName;
     if (aFailedChannel) {
       aFailedChannel->GetName(chanName);
     } else {
       chanName.AssignLiteral("<no channel>");
     }
 
-    PR_LOG(gDocShellLog, PR_LOG_DEBUG,
+    MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
            ("nsDocShell[%p]::LoadErrorPage(\"%s\", \"%s\", {...}, [%s])\n", this,
             spec.get(), NS_ConvertUTF16toUTF8(aURL).get(), chanName.get()));
   }
 #endif
   mFailedChannel = aFailedChannel;
   mFailedURI = aURI;
   mFailedLoadType = mLoadType;
 
@@ -11159,17 +11159,17 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsICh
 
     nsAutoCString chanName;
     if (aChannel) {
       aChannel->GetName(chanName);
     } else {
       chanName.AssignLiteral("<no channel>");
     }
 
-    PR_LOG(gDocShellLog, PR_LOG_DEBUG,
+    MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
            ("nsDocShell[%p]::OnNewURI(\"%s\", [%s], 0x%x)\n", this, spec.get(),
             chanName.get(), aLoadType));
   }
 #endif
 
   bool equalUri = false;
 
   // Get the post data and the HTTP response code from the channel.
@@ -11224,17 +11224,17 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsICh
   }
 
 #ifdef DEBUG
   bool shAvailable = (rootSH != nullptr);
 
   // XXX This log message is almost useless because |updateSHistory|
   //     and |updateGHistory| are not correct at this point.
 
-  PR_LOG(gDocShellLog, PR_LOG_DEBUG,
+  MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
          ("  shAvailable=%i updateSHistory=%i updateGHistory=%i"
           " equalURI=%i\n",
           shAvailable, updateSHistory, updateGHistory, equalUri));
 
   if (shAvailable && mCurrentURI && !mOSHE && aLoadType != LOAD_ERROR_PAGE) {
     NS_ASSERTION(NS_IsAboutBlank(mCurrentURI),
                  "no SHEntry for a non-transient viewer?");
   }
@@ -11779,17 +11779,17 @@ nsDocShell::AddToSessionHistory(nsIURI* 
 
     nsAutoCString chanName;
     if (aChannel) {
       aChannel->GetName(chanName);
     } else {
       chanName.AssignLiteral("<no channel>");
     }
 
-    PR_LOG(gDocShellLog, PR_LOG_DEBUG,
+    MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
            ("nsDocShell[%p]::AddToSessionHistory(\"%s\", [%s])\n",
             this, spec.get(), chanName.get()));
   }
 #endif
 
   nsresult rv = NS_OK;
   nsCOMPtr<nsISHEntry> entry;
   bool shouldPersist;
--- a/docshell/shistory/nsSHistory.cpp
+++ b/docshell/shistory/nsSHistory.cpp
@@ -63,17 +63,17 @@ static PRLogModuleInfo*
 GetSHistoryLog()
 {
   static PRLogModuleInfo* sLog;
   if (!sLog) {
     sLog = PR_NewLogModule("nsSHistory");
   }
   return sLog;
 }
-#define LOG(format) PR_LOG(GetSHistoryLog(), PR_LOG_DEBUG, format)
+#define LOG(format) MOZ_LOG(GetSHistoryLog(), PR_LOG_DEBUG, format)
 
 // This macro makes it easier to print a log message which includes a URI's
 // spec.  Example use:
 //
 //  nsIURI *uri = [...];
 //  LOG_SPEC(("The URI is %s.", _spec), uri);
 //
 #define LOG_SPEC(format, uri)                              \
--- a/dom/base/ThirdPartyUtil.cpp
+++ b/dom/base/ThirdPartyUtil.cpp
@@ -18,17 +18,17 @@
 
 NS_IMPL_ISUPPORTS(ThirdPartyUtil, mozIThirdPartyUtil)
 
 //
 // NSPR_LOG_MODULES=thirdPartyUtil:5
 //
 static PRLogModuleInfo *gThirdPartyLog;
 #undef LOG
-#define LOG(args)     PR_LOG(gThirdPartyLog, PR_LOG_DEBUG, args)
+#define LOG(args)     MOZ_LOG(gThirdPartyLog, PR_LOG_DEBUG, args)
 
 nsresult
 ThirdPartyUtil::Init()
 {
   NS_ENSURE_TRUE(NS_IsMainThread(), NS_ERROR_NOT_AVAILABLE);
 
   nsresult rv;
   mTLDService = do_GetService(NS_EFFECTIVETLDSERVICE_CONTRACTID, &rv);
--- a/dom/base/nsContentPolicy.cpp
+++ b/dom/base/nsContentPolicy.cpp
@@ -198,17 +198,17 @@ nsContentPolicy::CheckPolicy(CPMethod   
       nsAutoCString spec("None");                                             \
       if (contentLocation) {                                                  \
           contentLocation->GetSpec(spec);                                     \
       }                                                                       \
       nsAutoCString refSpec("None");                                          \
       if (requestingLocation) {                                               \
           requestingLocation->GetSpec(refSpec);                               \
       }                                                                       \
-      PR_LOG(gConPolLog, PR_LOG_DEBUG,                                        \
+      MOZ_LOG(gConPolLog, PR_LOG_DEBUG,                                        \
              ("Content Policy: " logType ": <%s> <Ref:%s> result=%s",         \
               spec.get(), refSpec.get(), resultName)                          \
              );                                                               \
     }                                                                         \
   PR_END_MACRO
 
 NS_IMETHODIMP
 nsContentPolicy::ShouldLoad(uint32_t          contentType,
--- a/dom/base/nsDOMDataChannel.cpp
+++ b/dom/base/nsDOMDataChannel.cpp
@@ -6,17 +6,17 @@
 
 #include "nsDOMDataChannel.h"
 
 #include "base/basictypes.h"
 #include "mozilla/Logging.h"
 
 extern PRLogModuleInfo* GetDataChannelLog();
 #undef LOG
-#define LOG(args) PR_LOG(GetDataChannelLog(), PR_LOG_DEBUG, args)
+#define LOG(args) MOZ_LOG(GetDataChannelLog(), PR_LOG_DEBUG, args)
 
 
 #include "nsDOMDataChannelDeclarations.h"
 #include "nsDOMDataChannel.h"
 #include "nsIDOMDataChannel.h"
 #include "nsIDOMMessageEvent.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/dom/File.h"
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -1588,17 +1588,17 @@ nsDocument::nsDocument(const char* aCont
   , mViewportType(Unknown)
 {
   SetContentTypeInternal(nsDependentCString(aContentType));
 
   if (!gDocumentLeakPRLog)
     gDocumentLeakPRLog = PR_NewLogModule("DocumentLeak");
 
   if (gDocumentLeakPRLog)
-    PR_LOG(gDocumentLeakPRLog, PR_LOG_DEBUG,
+    MOZ_LOG(gDocumentLeakPRLog, PR_LOG_DEBUG,
            ("DOCUMENT %p created", this));
 
   if (!gCspPRLog)
     gCspPRLog = PR_NewLogModule("CSP");
 
   // Start out mLastStyleSheetSet as null, per spec
   SetDOMStringToNull(mLastStyleSheetSet);
 
@@ -1632,17 +1632,17 @@ nsIDocument::~nsIDocument()
 
   UnlinkOriginalDocumentIfStatic();
 }
 
 
 nsDocument::~nsDocument()
 {
   if (gDocumentLeakPRLog)
-    PR_LOG(gDocumentLeakPRLog, PR_LOG_DEBUG,
+    MOZ_LOG(gDocumentLeakPRLog, PR_LOG_DEBUG,
            ("DOCUMENT %p destroyed", this));
 
   NS_ASSERTION(!mIsShowing, "Destroying a currently-showing document");
 
   // Note: This assert is only non-fatal because mochitest-bc triggers
   // it... as well as the preceding assert about !mIsShowing.
   NS_ASSERTION(!mObservingAppThemeChanged,
                "Document leaked to shutdown, then the observer service dropped "
@@ -2766,17 +2766,17 @@ AppendCSPFromHeader(nsIContentSecurityPo
   // See RFC2616 section 4.2 (last paragraph)
   nsresult rv = NS_OK;
   nsCharSeparatedTokenizer tokenizer(aHeaderValue, ',');
   while (tokenizer.hasMoreTokens()) {
       const nsSubstring& policy = tokenizer.nextToken();
       rv = csp->AppendPolicy(policy, aReportOnly);
       NS_ENSURE_SUCCESS(rv, rv);
       {
-        PR_LOG(gCspPRLog, PR_LOG_DEBUG,
+        MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
                 ("CSP refined with policy: \"%s\"",
                 NS_ConvertUTF16toUTF8(policy).get()));
       }
   }
   return NS_OK;
 }
 
 bool
@@ -2806,17 +2806,17 @@ nsDocument::IsLoopDocument(nsIChannel *a
   return isLoop;
 }
 
 nsresult
 nsDocument::InitCSP(nsIChannel* aChannel)
 {
   nsCOMPtr<nsIContentSecurityPolicy> csp;
   if (!CSPService::sCSPEnabled) {
-    PR_LOG(gCspPRLog, PR_LOG_DEBUG,
+    MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
            ("CSP is disabled, skipping CSP init for document %p", this));
     return NS_OK;
   }
 
   nsAutoCString tCspHeaderValue, tCspROHeaderValue;
 
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aChannel);
   if (httpChannel) {
@@ -2864,26 +2864,26 @@ nsDocument::InitCSP(nsIChannel* aChannel
       !applyLoopCSP &&
       cspHeaderValue.IsEmpty() &&
       cspROHeaderValue.IsEmpty()) {
     if (PR_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
       nsCOMPtr<nsIURI> chanURI;
       aChannel->GetURI(getter_AddRefs(chanURI));
       nsAutoCString aspec;
       chanURI->GetAsciiSpec(aspec);
-      PR_LOG(gCspPRLog, PR_LOG_DEBUG,
+      MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
              ("no CSP for document, %s, %s",
               aspec.get(),
               applyAppDefaultCSP ? "is app" : "not an app"));
     }
 
     return NS_OK;
   }
 
-  PR_LOG(gCspPRLog, PR_LOG_DEBUG, ("Document is an app or CSP header specified %p", this));
+  MOZ_LOG(gCspPRLog, PR_LOG_DEBUG, ("Document is an app or CSP header specified %p", this));
 
   nsresult rv;
 
   // If Document is an app check to see if we already set CSP and return early
   // if that is indeed the case.
   //
   // In general (see bug 947831), we should not be setting CSP on a principal
   // that aliases another document. For non-app code this is not a problem
@@ -2892,28 +2892,28 @@ nsDocument::InitCSP(nsIChannel* aChannel
   // about:srcodoc iframes) and thus won't try to set the CSP again. This
   // check ensures that we do not try to set CSP for an app.
   if (applyAppDefaultCSP || applyAppManifestCSP) {
     nsCOMPtr<nsIContentSecurityPolicy> csp;
     rv = principal->GetCsp(getter_AddRefs(csp));
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (csp) {
-      PR_LOG(gCspPRLog, PR_LOG_DEBUG, ("%s %s %s",
+      MOZ_LOG(gCspPRLog, PR_LOG_DEBUG, ("%s %s %s",
            "This document is sharing principal with another document.",
            "Since the document is an app, CSP was already set.",
            "Skipping attempt to set CSP."));
       return NS_OK;
     }
   }
 
   csp = do_CreateInstance("@mozilla.org/cspcontext;1", &rv);
 
   if (NS_FAILED(rv)) {
-    PR_LOG(gCspPRLog, PR_LOG_DEBUG, ("Failed to create CSP object: %x", rv));
+    MOZ_LOG(gCspPRLog, PR_LOG_DEBUG, ("Failed to create CSP object: %x", rv));
     return rv;
   }
 
   // used as a "self" identifier for the CSP.
   nsCOMPtr<nsIURI> selfURI;
   aChannel->GetURI(getter_AddRefs(selfURI));
 
   // Store the request context for violation reports
@@ -2956,17 +2956,17 @@ nsDocument::InitCSP(nsIChannel* aChannel
   nsCOMPtr<nsIDocShell> docShell(mDocumentContainer);
   if (docShell) {
     bool safeAncestry = false;
 
     // PermitsAncestry sends violation reports when necessary
     rv = csp->PermitsAncestry(docShell, &safeAncestry);
 
     if (NS_FAILED(rv) || !safeAncestry) {
-      PR_LOG(gCspPRLog, PR_LOG_DEBUG,
+      MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
               ("CSP doesn't like frame's ancestry, not loading."));
       // stop!  ERROR page!
       aChannel->Cancel(NS_ERROR_CSP_FRAME_ANCESTOR_VIOLATION);
     }
   }
 
   // ----- Set up any Referrer Policy specified by CSP
   bool hasReferrerPolicy = false;
@@ -2977,30 +2977,30 @@ nsDocument::InitCSP(nsIChannel* aChannel
     // Referrer policy spec (section 6.1) says that once the referrer policy
     // is set, any future attempts to change it result in No-Referrer.
     if (!mReferrerPolicySet) {
       mReferrerPolicy = static_cast<ReferrerPolicy>(referrerPolicy);
       mReferrerPolicySet = true;
     } else if (mReferrerPolicy != referrerPolicy) {
       mReferrerPolicy = mozilla::net::RP_No_Referrer;
       {
-        PR_LOG(gCspPRLog, PR_LOG_DEBUG, ("%s %s",
+        MOZ_LOG(gCspPRLog, PR_LOG_DEBUG, ("%s %s",
                 "CSP wants to set referrer, but nsDocument"
                 "already has it set. No referrers will be sent"));
       }
     }
 
     // Referrer Policy is set separately for the speculative parser in
     // nsHTMLDocument::StartDocumentLoad() so there's nothing to do here for
     // speculative loads.
   }
 
   rv = principal->SetCsp(csp);
   NS_ENSURE_SUCCESS(rv, rv);
-  PR_LOG(gCspPRLog, PR_LOG_DEBUG,
+  MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
          ("Inserted CSP into principal %p", principal));
 
   return NS_OK;
 }
 
 void
 nsDocument::StopDocumentLoad()
 {
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -72,26 +72,26 @@ using namespace mozilla::dom;
 using namespace mozilla::widget;
 
 // Two types of focus pr logging are available:
 //   'Focus' for normal focus manager calls
 //   'FocusNavigation' for tab and document navigation
 PRLogModuleInfo* gFocusLog;
 PRLogModuleInfo* gFocusNavigationLog;
 
-#define LOGFOCUS(args) PR_LOG(gFocusLog, PR_LOG_DEBUG, args)
-#define LOGFOCUSNAVIGATION(args) PR_LOG(gFocusNavigationLog, PR_LOG_DEBUG, args)
+#define LOGFOCUS(args) MOZ_LOG(gFocusLog, PR_LOG_DEBUG, args)
+#define LOGFOCUSNAVIGATION(args) MOZ_LOG(gFocusNavigationLog, PR_LOG_DEBUG, args)
 
 #define LOGTAG(log, format, content)                            \
   if (PR_LOG_TEST(log, PR_LOG_DEBUG)) {                         \
     nsAutoCString tag(NS_LITERAL_CSTRING("(none)"));            \
     if (content) {                                              \
       content->NodeInfo()->NameAtom()->ToUTF8String(tag);       \
     }                                                           \
-    PR_LOG(log, PR_LOG_DEBUG, (format, tag.get()));             \
+    MOZ_LOG(log, PR_LOG_DEBUG, (format, tag.get()));             \
   }
 
 #define LOGCONTENT(format, content) LOGTAG(gFocusLog, format, content)
 #define LOGCONTENTNAVIGATION(format, content) LOGTAG(gFocusNavigationLog, format, content)
 
 struct nsDelayedBlurOrFocusEvent
 {
   nsDelayedBlurOrFocusEvent(uint32_t aType,
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -1206,17 +1206,17 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalW
                   static_cast<void*>(ToCanonicalSupports(this)),
                   getpid(),
                   gSerialCounter,
                   static_cast<void*>(ToCanonicalSupports(aOuterWindow)));
   }
 #endif
 
   if (gDOMLeakPRLog)
-    PR_LOG(gDOMLeakPRLog, PR_LOG_DEBUG,
+    MOZ_LOG(gDOMLeakPRLog, PR_LOG_DEBUG,
            ("DOMWINDOW %p created outer=%p", this, aOuterWindow));
 
   NS_ASSERTION(sWindowsById, "Windows hash table must be created!");
   NS_ASSERTION(!sWindowsById->Get(mWindowID),
                "This window shouldn't be in the hash table yet!");
   // We seem to see crashes in release builds because of null |sWindowsById|.
   if (sWindowsById) {
     sWindowsById->Put(mWindowID, this);
@@ -1296,17 +1296,17 @@ nsGlobalWindow::~nsGlobalWindow()
                   getpid(),
                   mSerial,
                   static_cast<void*>(ToCanonicalSupports(outer)),
                   url.get());
   }
 #endif
 
   if (gDOMLeakPRLog)
-    PR_LOG(gDOMLeakPRLog, PR_LOG_DEBUG,
+    MOZ_LOG(gDOMLeakPRLog, PR_LOG_DEBUG,
            ("DOMWINDOW %p destroyed", this));
 
   if (IsOuterWindow()) {
     JSObject *proxy = GetWrapperPreserveColor();
     if (proxy) {
       js::SetProxyExtra(proxy, 0, js::PrivateValue(nullptr));
     }
 
--- a/dom/base/nsNodeInfoManager.cpp
+++ b/dom/base/nsNodeInfoManager.cpp
@@ -114,17 +114,17 @@ nsNodeInfoManager::nsNodeInfoManager()
     mDocumentNodeInfo(nullptr)
 {
   nsLayoutStatics::AddRef();
 
   if (!gNodeInfoManagerLeakPRLog)
     gNodeInfoManagerLeakPRLog = PR_NewLogModule("NodeInfoManagerLeak");
 
   if (gNodeInfoManagerLeakPRLog)
-    PR_LOG(gNodeInfoManagerLeakPRLog, PR_LOG_DEBUG,
+    MOZ_LOG(gNodeInfoManagerLeakPRLog, PR_LOG_DEBUG,
            ("NODEINFOMANAGER %p created", this));
 
   mNodeInfoHash = PL_NewHashTable(32, GetNodeInfoInnerHashValue,
                                   NodeInfoInnerKeyCompare,
                                   PL_CompareValues, &allocOps, nullptr);
 }
 
 
@@ -134,17 +134,17 @@ nsNodeInfoManager::~nsNodeInfoManager()
     PL_HashTableDestroy(mNodeInfoHash);
 
   // Note: mPrincipal may be null here if we never got inited correctly
   mPrincipal = nullptr;
 
   mBindingManager = nullptr;
 
   if (gNodeInfoManagerLeakPRLog)
-    PR_LOG(gNodeInfoManagerLeakPRLog, PR_LOG_DEBUG,
+    MOZ_LOG(gNodeInfoManagerLeakPRLog, PR_LOG_DEBUG,
            ("NODEINFOMANAGER %p destroyed", this));
 
   nsLayoutStatics::Release();
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsNodeInfoManager)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_0(nsNodeInfoManager)
@@ -191,17 +191,17 @@ nsNodeInfoManager::Init(nsIDocument *aDo
     mBindingManager = new nsBindingManager(aDocument);
   }
 
   mDefaultPrincipal = mPrincipal;
 
   mDocument = aDocument;
 
   if (gNodeInfoManagerLeakPRLog)
-    PR_LOG(gNodeInfoManagerLeakPRLog, PR_LOG_DEBUG,
+    MOZ_LOG(gNodeInfoManagerLeakPRLog, PR_LOG_DEBUG,
            ("NODEINFOMANAGER %p Init document=%p", this, aDocument));
 
   return NS_OK;
 }
 
 // static
 int
 nsNodeInfoManager::DropNodeInfoDocument(PLHashEntry *he, int hashIndex, void *arg)
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -110,17 +110,17 @@ static PRLogModuleInfo*
 GetObjectLog()
 {
   static PRLogModuleInfo *sLog;
   if (!sLog)
     sLog = PR_NewLogModule("objlc");
   return sLog;
 }
 
-#define LOG(args) PR_LOG(GetObjectLog(), PR_LOG_DEBUG, args)
+#define LOG(args) MOZ_LOG(GetObjectLog(), PR_LOG_DEBUG, args)
 #define LOG_ENABLED() PR_LOG_TEST(GetObjectLog(), PR_LOG_DEBUG)
 
 static bool
 IsJavaMIME(const nsACString & aMIMEType)
 {
   return
     nsPluginHost::GetSpecialType(aMIMEType) == nsPluginHost::eSpecialType_Java;
 }
--- a/dom/camera/CameraCommon.h
+++ b/dom/camera/CameraCommon.h
@@ -13,17 +13,17 @@
 #else
 #define __func__ __FILE__
 #endif
 #endif
 
 #include "mozilla/Logging.h"
 
 extern PRLogModuleInfo* GetCameraLog();
-#define DOM_CAMERA_LOG( type, ... ) PR_LOG(GetCameraLog(), (PRLogModuleLevel)type, ( __VA_ARGS__ ))
+#define DOM_CAMERA_LOG( type, ... ) MOZ_LOG(GetCameraLog(), (PRLogModuleLevel)type, ( __VA_ARGS__ ))
 
 #define DOM_CAMERA_LOGA( ... )      DOM_CAMERA_LOG( 0, __VA_ARGS__ )
 
 /**
  * From the least to the most output.
  */
 enum {
   DOM_CAMERA_LOG_NOTHING,
--- a/dom/events/IMEStateManager.cpp
+++ b/dom/events/IMEStateManager.cpp
@@ -196,17 +196,17 @@ IMEStateManager::Init()
     sISMLog = PR_NewLogModule("IMEStateManager");
   }
 }
 
 // static
 void
 IMEStateManager::Shutdown()
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::Shutdown(), "
      "sTextCompositions=0x%p, sTextCompositions->Length()=%u",
      sTextCompositions, sTextCompositions ? sTextCompositions->Length() : 0));
 
   MOZ_ASSERT(!sTextCompositions || !sTextCompositions->Length());
   delete sTextCompositions;
   sTextCompositions = nullptr;
 }
@@ -217,37 +217,37 @@ IMEStateManager::OnDestroyPresContext(ns
 {
   NS_ENSURE_ARG_POINTER(aPresContext);
 
   // First, if there is a composition in the aPresContext, clean up it.
   if (sTextCompositions) {
     TextCompositionArray::index_type i =
       sTextCompositions->IndexOf(aPresContext);
     if (i != TextCompositionArray::NoIndex) {
-      PR_LOG(sISMLog, PR_LOG_DEBUG,
+      MOZ_LOG(sISMLog, PR_LOG_DEBUG,
         ("ISM:   IMEStateManager::OnDestroyPresContext(), "
          "removing TextComposition instance from the array (index=%u)", i));
       // there should be only one composition per presContext object.
       sTextCompositions->ElementAt(i)->Destroy();
       sTextCompositions->RemoveElementAt(i);
       if (sTextCompositions->IndexOf(aPresContext) !=
             TextCompositionArray::NoIndex) {
-        PR_LOG(sISMLog, PR_LOG_ERROR,
+        MOZ_LOG(sISMLog, PR_LOG_ERROR,
           ("ISM:   IMEStateManager::OnDestroyPresContext(), FAILED to remove "
            "TextComposition instance from the array"));
         MOZ_CRASH("Failed to remove TextComposition instance from the array");
       }
     }
   }
 
   if (aPresContext != sPresContext) {
     return NS_OK;
   }
 
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::OnDestroyPresContext(aPresContext=0x%p), "
      "sPresContext=0x%p, sContent=0x%p, sTextCompositions=0x%p",
      aPresContext, sPresContext, sContent, sTextCompositions));
 
   DestroyIMEContentObserver();
 
   nsCOMPtr<nsIWidget> widget = sPresContext->GetRootWidget();
   if (widget) {
@@ -269,17 +269,17 @@ IMEStateManager::OnRemoveContent(nsPresC
   NS_ENSURE_ARG_POINTER(aPresContext);
 
   // First, if there is a composition in the aContent, clean up it.
   if (sTextCompositions) {
     nsRefPtr<TextComposition> compositionInContent =
       sTextCompositions->GetCompositionInContent(aPresContext, aContent);
 
     if (compositionInContent) {
-      PR_LOG(sISMLog, PR_LOG_DEBUG,
+      MOZ_LOG(sISMLog, PR_LOG_DEBUG,
         ("ISM:   IMEStateManager::OnRemoveContent(), "
          "composition is in the content"));
 
       // Try resetting the native IME state.  Be aware, typically, this method
       // is called during the content being removed.  Then, the native
       // composition events which are caused by following APIs are ignored due
       // to unsafe to run script (in PresShell::HandleEvent()).
       nsCOMPtr<nsIWidget> widget = aPresContext->GetRootWidget();
@@ -292,17 +292,17 @@ IMEStateManager::OnRemoveContent(nsPresC
     }
   }
 
   if (!sPresContext || !sContent ||
       !nsContentUtils::ContentIsDescendantOf(sContent, aContent)) {
     return NS_OK;
   }
 
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::OnRemoveContent(aPresContext=0x%p, "
      "aContent=0x%p), sPresContext=0x%p, sContent=0x%p, sTextCompositions=0x%p",
      aPresContext, aContent, sPresContext, sContent, sTextCompositions));
 
   DestroyIMEContentObserver();
 
   // Current IME transaction should commit
   nsCOMPtr<nsIWidget> widget = sPresContext->GetRootWidget();
@@ -320,32 +320,32 @@ IMEStateManager::OnRemoveContent(nsPresC
 }
 
 // static
 nsresult
 IMEStateManager::OnChangeFocus(nsPresContext* aPresContext,
                                nsIContent* aContent,
                                InputContextAction::Cause aCause)
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::OnChangeFocus(aPresContext=0x%p, "
      "aContent=0x%p, aCause=%s)",
      aPresContext, aContent, GetActionCauseName(aCause)));
 
   InputContextAction action(aCause);
   return OnChangeFocusInternal(aPresContext, aContent, action);
 }
 
 // static
 nsresult
 IMEStateManager::OnChangeFocusInternal(nsPresContext* aPresContext,
                                        nsIContent* aContent,
                                        InputContextAction aAction)
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::OnChangeFocusInternal(aPresContext=0x%p, "
      "aContent=0x%p, aAction={ mCause=%s, mFocusChange=%s }), "
      "sPresContext=0x%p, sContent=0x%p, sActiveIMEContentObserver=0x%p",
      aPresContext, aContent, GetActionCauseName(aAction.mCause),
      GetActionFocusChangeName(aAction.mFocusChange),
      sPresContext, sContent, sActiveIMEContentObserver));
 
   bool focusActuallyChanging =
@@ -363,27 +363,27 @@ IMEStateManager::OnChangeFocusInternal(n
 
   if (sActiveIMEContentObserver &&
       (aPresContext || !sActiveIMEContentObserver->KeepAliveDuringDeactive()) &&
       !sActiveIMEContentObserver->IsManaging(aPresContext, aContent)) {
     DestroyIMEContentObserver();
   }
 
   if (!aPresContext) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::OnChangeFocusInternal(), "
        "no nsPresContext is being activated"));
     return NS_OK;
   }
 
   nsCOMPtr<nsIWidget> widget =
     (sPresContext == aPresContext) ? oldWidget.get() :
                                      aPresContext->GetRootWidget();
   if (NS_WARN_IF(!widget)) {
-    PR_LOG(sISMLog, PR_LOG_ERROR,
+    MOZ_LOG(sISMLog, PR_LOG_ERROR,
       ("ISM:   IMEStateManager::OnChangeFocusInternal(), FAILED due to "
        "no widget to manage its IME state"));
     return NS_OK;
   }
 
   IMEState newState = GetNewIMEState(aPresContext, aContent);
 
   // In e10s, remote content may have IME focus.  The main process (i.e. this process)
@@ -391,32 +391,32 @@ IMEStateManager::OnChangeFocusInternal(n
   // some other remote content.  The content process would later re-ENABLE IME, meaning
   // that all state-changes were unnecessary.
   // Here we filter the common case where the main process knows that the remote
   // process controls IME focus.  The DISABLED->re-ENABLED progression can
   // still happen since remote content may be concurrently communicating its claim
   // on focus to the main process... but this cannot cause bugs like missed keypresses.
   // (It just means a lot of needless IPC.)
   if ((newState.mEnabled == IMEState::DISABLED) && TabParent::GetIMETabParent()) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::OnChangeFocusInternal(), "
        "Parent process cancels to set DISABLED state because the content process "
        "has IME focus and has already sets IME state"));  
     MOZ_ASSERT(XRE_IsParentProcess(),
       "TabParent::GetIMETabParent() should never return non-null value "
       "in the content process");
     return NS_OK;
   }
 
   if (!focusActuallyChanging) {
     // actual focus isn't changing, but if IME enabled state is changing,
     // we should do it.
     InputContext context = widget->GetInputContext();
     if (context.mIMEState.mEnabled == newState.mEnabled) {
-      PR_LOG(sISMLog, PR_LOG_DEBUG,
+      MOZ_LOG(sISMLog, PR_LOG_DEBUG,
         ("ISM:   IMEStateManager::OnChangeFocusInternal(), "
          "neither focus nor IME state is changing"));
       return NS_OK;
     }
     aAction.mFocusChange = InputContextAction::FOCUS_NOT_CHANGED;
 
     // Even if focus isn't changing actually, we should commit current
     // composition here since the IME state is changing.
@@ -445,17 +445,17 @@ IMEStateManager::OnChangeFocusInternal(n
 
   return NS_OK;
 }
 
 // static
 void
 IMEStateManager::OnInstalledMenuKeyboardListener(bool aInstalling)
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::OnInstalledMenuKeyboardListener(aInstalling=%s), "
      "sInstalledMenuKeyboardListener=%s",
      GetBoolName(aInstalling), GetBoolName(sInstalledMenuKeyboardListener)));
 
   sInstalledMenuKeyboardListener = aInstalling;
 
   InputContextAction action(InputContextAction::CAUSE_UNKNOWN,
     aInstalling ? InputContextAction::MENU_GOT_PSEUDO_FOCUS :
@@ -464,113 +464,113 @@ IMEStateManager::OnInstalledMenuKeyboard
 }
 
 // static
 bool
 IMEStateManager::OnMouseButtonEventInEditor(nsPresContext* aPresContext,
                                             nsIContent* aContent,
                                             nsIDOMMouseEvent* aMouseEvent)
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::OnMouseButtonEventInEditor(aPresContext=0x%p, "
      "aContent=0x%p, aMouseEvent=0x%p), sPresContext=0x%p, sContent=0x%p",
      aPresContext, aContent, aMouseEvent, sPresContext, sContent));
 
   if (sPresContext != aPresContext || sContent != aContent) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::OnMouseButtonEventInEditor(), "
        "the mouse event isn't fired on the editor managed by ISM"));
     return false;
   }
 
   if (!sActiveIMEContentObserver) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::OnMouseButtonEventInEditor(), "
        "there is no active IMEContentObserver"));
     return false;
   }
 
   if (!sActiveIMEContentObserver->IsManaging(aPresContext, aContent)) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::OnMouseButtonEventInEditor(), "
        "the active IMEContentObserver isn't managing the editor"));
     return false;
   }
 
   WidgetMouseEvent* internalEvent =
     aMouseEvent->GetInternalNSEvent()->AsMouseEvent();
   if (NS_WARN_IF(!internalEvent)) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::OnMouseButtonEventInEditor(), "
        "the internal event of aMouseEvent isn't WidgetMouseEvent"));
     return false;
   }
 
   bool consumed =
     sActiveIMEContentObserver->OnMouseButtonEvent(aPresContext, internalEvent);
 
   if (PR_LOG_TEST(sISMLog, PR_LOG_ALWAYS)) {
     nsAutoString eventType;
     aMouseEvent->GetType(eventType);
-    PR_LOG(sISMLog, PR_LOG_ALWAYS,
+    MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
       ("ISM:   IMEStateManager::OnMouseButtonEventInEditor(), "
        "mouse event (type=%s, button=%d) is %s",
        NS_ConvertUTF16toUTF8(eventType).get(), internalEvent->button,
        consumed ? "consumed" : "not consumed"));
   }
 
   return consumed;
 }
 
 // static
 void
 IMEStateManager::OnClickInEditor(nsPresContext* aPresContext,
                                  nsIContent* aContent,
                                  nsIDOMMouseEvent* aMouseEvent)
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::OnClickInEditor(aPresContext=0x%p, aContent=0x%p, "
      "aMouseEvent=0x%p), sPresContext=0x%p, sContent=0x%p",
      aPresContext, aContent, aMouseEvent, sPresContext, sContent));
 
   if (sPresContext != aPresContext || sContent != aContent) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::OnClickInEditor(), "
        "the mouse event isn't fired on the editor managed by ISM"));
     return;
   }
 
   nsCOMPtr<nsIWidget> widget = aPresContext->GetRootWidget();
   NS_ENSURE_TRUE_VOID(widget);
 
   bool isTrusted;
   nsresult rv = aMouseEvent->GetIsTrusted(&isTrusted);
   NS_ENSURE_SUCCESS_VOID(rv);
   if (!isTrusted) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::OnClickInEditor(), "
        "the mouse event isn't a trusted event"));
     return; // ignore untrusted event.
   }
 
   int16_t button;
   rv = aMouseEvent->GetButton(&button);
   NS_ENSURE_SUCCESS_VOID(rv);
   if (button != 0) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::OnClickInEditor(), "
        "the mouse event isn't a left mouse button event"));
     return; // not a left click event.
   }
 
   int32_t clickCount;
   rv = aMouseEvent->GetDetail(&clickCount);
   NS_ENSURE_SUCCESS_VOID(rv);
   if (clickCount != 1) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::OnClickInEditor(), "
        "the mouse event isn't a single click event"));
     return; // should notify only first click event.
   }
 
   InputContextAction action(InputContextAction::CAUSE_MOUSE,
                             InputContextAction::FOCUS_NOT_CHANGED);
   IMEState newState = GetNewIMEState(aPresContext, aContent);
@@ -578,77 +578,77 @@ IMEStateManager::OnClickInEditor(nsPresC
 }
 
 // static
 void
 IMEStateManager::OnFocusInEditor(nsPresContext* aPresContext,
                                  nsIContent* aContent,
                                  nsIEditor* aEditor)
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::OnFocusInEditor(aPresContext=0x%p, aContent=0x%p, "
      "aEditor=0x%p), sPresContext=0x%p, sContent=0x%p, "
      "sActiveIMEContentObserver=0x%p",
      aPresContext, aContent, aEditor, sPresContext, sContent,
      sActiveIMEContentObserver));
 
   if (sPresContext != aPresContext || sContent != aContent) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::OnFocusInEditor(), "
        "an editor not managed by ISM gets focus"));
     return;
   }
 
   // If the IMEContentObserver instance isn't managing the editor actually,
   // we need to recreate the instance.
   if (sActiveIMEContentObserver) {
     if (sActiveIMEContentObserver->IsManaging(aPresContext, aContent)) {
-      PR_LOG(sISMLog, PR_LOG_DEBUG,
+      MOZ_LOG(sISMLog, PR_LOG_DEBUG,
         ("ISM:   IMEStateManager::OnFocusInEditor(), "
          "the editor is already being managed by sActiveIMEContentObserver"));
       return;
     }
     DestroyIMEContentObserver();
   }
 
   CreateIMEContentObserver(aEditor);
 }
 
 // static
 void
 IMEStateManager::UpdateIMEState(const IMEState& aNewIMEState,
                                 nsIContent* aContent,
                                 nsIEditor* aEditor)
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::UpdateIMEState(aNewIMEState={ mEnabled=%s, "
      "mOpen=%s }, aContent=0x%p, aEditor=0x%p), "
      "sPresContext=0x%p, sContent=0x%p, sActiveIMEContentObserver=0x%p, "
      "sIsGettingNewIMEState=%s",
      GetIMEStateEnabledName(aNewIMEState.mEnabled),
      GetIMEStateSetOpenName(aNewIMEState.mOpen), aContent, aEditor,
      sPresContext, sContent, sActiveIMEContentObserver,
      GetBoolName(sIsGettingNewIMEState)));
 
   if (sIsGettingNewIMEState) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::UpdateIMEState(), "
        "does nothing because of called while getting new IME state"));
     return;
   }
 
   if (NS_WARN_IF(!sPresContext)) {
-    PR_LOG(sISMLog, PR_LOG_ERROR,
+    MOZ_LOG(sISMLog, PR_LOG_ERROR,
       ("ISM:   IMEStateManager::UpdateIMEState(), FAILED due to "
        "no managing nsPresContext"));
     return;
   }
   nsCOMPtr<nsIWidget> widget = sPresContext->GetRootWidget();
   if (NS_WARN_IF(!widget)) {
-    PR_LOG(sISMLog, PR_LOG_ERROR,
+    MOZ_LOG(sISMLog, PR_LOG_ERROR,
       ("ISM:   IMEStateManager::UpdateIMEState(), FAILED due to "
        "no widget for the managing nsPresContext"));
     return;
   }
 
   // If the IMEContentObserver instance isn't managing the editor's current
   // editable root content, the editor frame might be reframed.  We should
   // recreate the instance at that time.
@@ -679,62 +679,62 @@ IMEStateManager::UpdateIMEState(const IM
   }
 }
 
 // static
 IMEState
 IMEStateManager::GetNewIMEState(nsPresContext* aPresContext,
                                 nsIContent*    aContent)
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::GetNewIMEState(aPresContext=0x%p, aContent=0x%p), "
      "sInstalledMenuKeyboardListener=%s",
      aPresContext, aContent, GetBoolName(sInstalledMenuKeyboardListener)));
 
   // On Printing or Print Preview, we don't need IME.
   if (aPresContext->Type() == nsPresContext::eContext_PrintPreview ||
       aPresContext->Type() == nsPresContext::eContext_Print) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::GetNewIMEState() returns DISABLED because "
        "the nsPresContext is for print or print preview"));
     return IMEState(IMEState::DISABLED);
   }
 
   if (sInstalledMenuKeyboardListener) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::GetNewIMEState() returns DISABLED because "
        "menu keyboard listener was installed"));
     return IMEState(IMEState::DISABLED);
   }
 
   if (!aContent) {
     // Even if there are no focused content, the focused document might be
     // editable, such case is design mode.
     nsIDocument* doc = aPresContext->Document();
     if (doc && doc->HasFlag(NODE_IS_EDITABLE)) {
-      PR_LOG(sISMLog, PR_LOG_DEBUG,
+      MOZ_LOG(sISMLog, PR_LOG_DEBUG,
         ("ISM:   IMEStateManager::GetNewIMEState() returns ENABLED because "
          "design mode editor has focus"));
       return IMEState(IMEState::ENABLED);
     }
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::GetNewIMEState() returns DISABLED because "
        "no content has focus"));
     return IMEState(IMEState::DISABLED);
   }
 
   // nsIContent::GetDesiredIMEState() may cause a call of UpdateIMEState()
   // from nsEditor::PostCreate() because GetDesiredIMEState() needs to retrieve
   // an editor instance for the element if it's editable element.
   // For avoiding such nested IME state updates, we should set
   // sIsGettingNewIMEState here and UpdateIMEState() should check it.
   GettingNewIMEStateBlocker blocker;
 
   IMEState newIMEState = aContent->GetDesiredIMEState();
-  PR_LOG(sISMLog, PR_LOG_DEBUG,
+  MOZ_LOG(sISMLog, PR_LOG_DEBUG,
     ("ISM:   IMEStateManager::GetNewIMEState() returns { mEnabled=%s, "
      "mOpen=%s }",
      GetIMEStateEnabledName(newIMEState.mEnabled),
      GetIMEStateSetOpenName(newIMEState.mOpen)));
   return newIMEState;
 }
 
 // Helper class, used for IME enabled state change notification
@@ -745,17 +745,17 @@ public:
   {
   }
 
   NS_IMETHOD Run()
   {
     nsCOMPtr<nsIObserverService> observerService =
       services::GetObserverService();
     if (observerService) {
-      PR_LOG(sISMLog, PR_LOG_ALWAYS,
+      MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
         ("ISM: IMEEnabledStateChangedEvent::Run(), notifies observers of "
          "\"ime-enabled-state-changed\""));
       nsAutoString state;
       state.AppendInt(mState);
       observerService->NotifyObservers(nullptr, "ime-enabled-state-changed",
                                        state.get());
     }
     return NS_OK;
@@ -767,17 +767,17 @@ private:
 
 // static
 void
 IMEStateManager::SetIMEState(const IMEState& aState,
                              nsIContent* aContent,
                              nsIWidget* aWidget,
                              InputContextAction aAction)
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::SetIMEState(aState={ mEnabled=%s, mOpen=%s }, "
      "aContent=0x%p, aWidget=0x%p, aAction={ mCause=%s, mFocusChange=%s })",
      GetIMEStateEnabledName(aState.mEnabled),
      GetIMEStateSetOpenName(aState.mOpen), aContent, aWidget,
      GetActionCauseName(aAction.mCause),
      GetActionFocusChangeName(aAction.mFocusChange)));
 
   NS_ENSURE_TRUE_VOID(aWidget);
@@ -853,17 +853,17 @@ IMEStateManager::SetIMEState(const IMESt
   // XXX I think that we should use nsContentUtils::IsCallerChrome() instead
   //     of the process type.
   if (aAction.mCause == InputContextAction::CAUSE_UNKNOWN &&
       XRE_GetProcessType() != GeckoProcessType_Content) {
     aAction.mCause = InputContextAction::CAUSE_UNKNOWN_CHROME;
   }
 
 
-  PR_LOG(sISMLog, PR_LOG_DEBUG,
+  MOZ_LOG(sISMLog, PR_LOG_DEBUG,
     ("ISM:   IMEStateManager::SetIMEState(), "
      "calling nsIWidget::SetInputContext(context={ mIMEState={ mEnabled=%s, "
      "mOpen=%s }, mHTMLInputType=\"%s\", mHTMLInputInputmode=\"%s\", "
      "mActionHint=\"%s\" }, aAction={ mCause=%s, mAction=%s })",
      GetIMEStateEnabledName(context.mIMEState.mEnabled),
      GetIMEStateSetOpenName(context.mIMEState.mOpen),
      NS_ConvertUTF16toUTF8(context.mHTMLInputType).get(),
      NS_ConvertUTF16toUTF8(context.mHTMLInputInputmode).get(),
@@ -895,17 +895,17 @@ void
 IMEStateManager::DispatchCompositionEvent(
                    nsINode* aEventTargetNode,
                    nsPresContext* aPresContext,
                    WidgetCompositionEvent* aCompositionEvent,
                    nsEventStatus* aStatus,
                    EventDispatchingCallback* aCallBack,
                    bool aIsSynthesized)
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::DispatchCompositionEvent(aNode=0x%p, "
      "aPresContext=0x%p, aCompositionEvent={ message=%s, "
      "mFlags={ mIsTrusted=%s, mPropagationStopped=%s } }, "
      "aIsSynthesized=%s)",
      aEventTargetNode, aPresContext,
      GetEventMessageName(aCompositionEvent->message),
      GetBoolName(aCompositionEvent->mFlags.mIsTrusted),
      GetBoolName(aCompositionEvent->mFlags.mPropagationStopped),
@@ -924,17 +924,17 @@ IMEStateManager::DispatchCompositionEven
   nsRefPtr<TextComposition> composition =
     sTextCompositions->GetCompositionFor(aCompositionEvent->widget);
   if (!composition) {
     // If synthesized event comes after delayed native composition events
     // for request of commit or cancel, we should ignore it.
     if (NS_WARN_IF(aIsSynthesized)) {
       return;
     }
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::DispatchCompositionEvent(), "
        "adding new TextComposition to the array"));
     MOZ_ASSERT(aCompositionEvent->message == NS_COMPOSITION_START);
     composition =
       new TextComposition(aPresContext, aEventTargetNode, aCompositionEvent);
     sTextCompositions->AppendElement(composition);
   }
 #ifdef DEBUG
@@ -960,17 +960,17 @@ IMEStateManager::DispatchCompositionEven
   //       the last event for the composition.  In this case, we need to
   //       destroy the TextComposition with synthesized compositionend event.
   if ((!aIsSynthesized ||
        composition->WasNativeCompositionEndEventDiscarded()) &&
       aCompositionEvent->CausesDOMCompositionEndEvent()) {
     TextCompositionArray::index_type i =
       sTextCompositions->IndexOf(aCompositionEvent->widget);
     if (i != TextCompositionArray::NoIndex) {
-      PR_LOG(sISMLog, PR_LOG_DEBUG,
+      MOZ_LOG(sISMLog, PR_LOG_DEBUG,
         ("ISM:   IMEStateManager::DispatchCompositionEvent(), "
          "removing TextComposition from the array since NS_COMPOSTION_END "
          "was dispatched"));
       sTextCompositions->ElementAt(i)->Destroy();
       sTextCompositions->RemoveElementAt(i);
     }
   }
 }
@@ -978,17 +978,17 @@ IMEStateManager::DispatchCompositionEven
 // static
 void
 IMEStateManager::OnCompositionEventDiscarded(
                    const WidgetCompositionEvent* aCompositionEvent)
 {
   // Note that this method is never called for synthesized events for emulating
   // commit or cancel composition.
 
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::OnCompositionEventDiscarded(aCompositionEvent={ "
      "message=%s, mFlags={ mIsTrusted=%s } })",
      GetEventMessageName(aCompositionEvent->message),
      GetBoolName(aCompositionEvent->mFlags.mIsTrusted)));
 
   if (!aCompositionEvent->mFlags.mIsTrusted) {
     return;
   }
@@ -1001,17 +1001,17 @@ IMEStateManager::OnCompositionEventDisca
 
   nsRefPtr<TextComposition> composition =
     sTextCompositions->GetCompositionFor(aCompositionEvent->widget);
   if (!composition) {
     // If the PresShell has been being destroyed during composition,
     // a TextComposition instance for the composition was already removed from
     // the array and destroyed in OnDestroyPresContext().  Therefore, we may
     // fail to retrieve a TextComposition instance here.
-    PR_LOG(sISMLog, PR_LOG_ALWAYS,
+    MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
       ("ISM:   IMEStateManager::OnCompositionEventDiscarded(), "
        "TextComposition instance for the widget has already gone"));
     return;
   }
   composition->OnCompositionEventDiscarded(aCompositionEvent);
 }
 
 // static
@@ -1022,24 +1022,24 @@ IMEStateManager::NotifyIME(IMEMessage aM
   nsRefPtr<TextComposition> composition;
   if (aWidget && sTextCompositions) {
     composition = sTextCompositions->GetCompositionFor(aWidget);
   }
 
   bool isSynthesizedForTests =
     composition && composition->IsSynthesizedForTests();
 
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::NotifyIME(aMessage=%s, aWidget=0x%p), "
      "composition=0x%p, composition->IsSynthesizedForTests()=%s",
      GetNotifyIMEMessageName(aMessage), aWidget, composition.get(),
      GetBoolName(isSynthesizedForTests)));
 
   if (NS_WARN_IF(!aWidget)) {
-    PR_LOG(sISMLog, PR_LOG_ERROR,
+    MOZ_LOG(sISMLog, PR_LOG_ERROR,
       ("ISM:   IMEStateManager::NotifyIME(), FAILED due to no widget"));
     return NS_ERROR_INVALID_ARG;
   }
 
   switch (aMessage) {
     case REQUEST_TO_COMMIT_COMPOSITION:
       return composition ?
         composition->RequestToCommit(aWidget, false) : NS_OK;
@@ -1057,25 +1057,25 @@ IMEStateManager::NotifyIME(IMEMessage aM
   return NS_ERROR_FAILURE;
 }
 
 // static
 nsresult
 IMEStateManager::NotifyIME(IMEMessage aMessage,
                            nsPresContext* aPresContext)
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::NotifyIME(aMessage=%s, aPresContext=0x%p)",
      GetNotifyIMEMessageName(aMessage), aPresContext));
 
   NS_ENSURE_TRUE(aPresContext, NS_ERROR_INVALID_ARG);
 
   nsIWidget* widget = aPresContext->GetRootWidget();
   if (NS_WARN_IF(!widget)) {
-    PR_LOG(sISMLog, PR_LOG_ERROR,
+    MOZ_LOG(sISMLog, PR_LOG_ERROR,
       ("ISM:   IMEStateManager::NotifyIME(), FAILED due to no widget for the "
        "nsPresContext"));
     return NS_ERROR_NOT_AVAILABLE;
   }
   return NotifyIME(aMessage, widget);
 }
 
 // static
@@ -1141,78 +1141,78 @@ IMEStateManager::IsEditableIMEState(nsIW
       MOZ_CRASH("Unknown IME enable state");
   }
 }
 
 // static
 void
 IMEStateManager::DestroyIMEContentObserver()
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::DestroyIMEContentObserver(), "
      "sActiveIMEContentObserver=0x%p",
      sActiveIMEContentObserver));
 
   if (!sActiveIMEContentObserver) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::DestroyIMEContentObserver() does nothing"));
     return;
   }
 
-  PR_LOG(sISMLog, PR_LOG_DEBUG,
+  MOZ_LOG(sISMLog, PR_LOG_DEBUG,
     ("ISM:   IMEStateManager::DestroyIMEContentObserver(), destroying "
      "the active IMEContentObserver..."));
   nsRefPtr<IMEContentObserver> tsm;
   tsm.swap(sActiveIMEContentObserver);
   tsm->Destroy();
 }
 
 // static
 void
 IMEStateManager::CreateIMEContentObserver(nsIEditor* aEditor)
 {
-  PR_LOG(sISMLog, PR_LOG_ALWAYS,
+  MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
     ("ISM: IMEStateManager::CreateIMEContentObserver(aEditor=0x%p), "
      "sPresContext=0x%p, sContent=0x%p, sActiveIMEContentObserver=0x%p, "
      "sActiveIMEContentObserver->IsManaging(sPresContext, sContent)=%s",
      aEditor, sPresContext, sContent, sActiveIMEContentObserver,
      GetBoolName(sActiveIMEContentObserver ?
        sActiveIMEContentObserver->IsManaging(sPresContext, sContent) : false)));
 
   if (NS_WARN_IF(sActiveIMEContentObserver)) {
-    PR_LOG(sISMLog, PR_LOG_ERROR,
+    MOZ_LOG(sISMLog, PR_LOG_ERROR,
       ("ISM:   IMEStateManager::CreateIMEContentObserver(), FAILED due to "
        "there is already an active IMEContentObserver"));
     MOZ_ASSERT(sActiveIMEContentObserver->IsManaging(sPresContext, sContent));
     return;
   }
 
   nsCOMPtr<nsIWidget> widget = sPresContext->GetRootWidget();
   if (!widget) {
-    PR_LOG(sISMLog, PR_LOG_ERROR,
+    MOZ_LOG(sISMLog, PR_LOG_ERROR,
       ("ISM:   IMEStateManager::CreateIMEContentObserver(), FAILED due to "
        "there is a root widget for the nsPresContext"));
     return; // Sometimes, there are no widgets.
   }
 
   // If it's not text ediable, we don't need to create IMEContentObserver.
   if (!IsEditableIMEState(widget)) {
-    PR_LOG(sISMLog, PR_LOG_DEBUG,
+    MOZ_LOG(sISMLog, PR_LOG_DEBUG,
       ("ISM:   IMEStateManager::CreateIMEContentObserver() doesn't create "
        "IMEContentObserver because of non-editable IME state"));
     return;
   }
 
   static bool sInitializeIsTestingIME = true;
   if (sInitializeIsTestingIME) {
     Preferences::AddBoolVarCache(&sIsTestingIME, "test.IME", false);
     sInitializeIsTestingIME = false;
   }
 
-  PR_LOG(sISMLog, PR_LOG_DEBUG,
+  MOZ_LOG(sISMLog, PR_LOG_DEBUG,
     ("ISM:   IMEStateManager::CreateIMEContentObserver() is creating an "
      "IMEContentObserver instance..."));
   sActiveIMEContentObserver = new IMEContentObserver();
   NS_ADDREF(sActiveIMEContentObserver);
 
   // IMEContentObserver::Init() might create another IMEContentObserver
   // instance.  So, sActiveIMEContentObserver would be replaced with new one.
   // We should hold the current instance here.
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -89,18 +89,18 @@
 #include "mozilla/Telemetry.h"
 
 #include "ImageContainer.h"
 #include "nsRange.h"
 #include <algorithm>
 
 static PRLogModuleInfo* gMediaElementLog;
 static PRLogModuleInfo* gMediaElementEventsLog;
-#define LOG(type, msg) PR_LOG(gMediaElementLog, type, msg)
-#define LOG_EVENT(type, msg) PR_LOG(gMediaElementEventsLog, type, msg)
+#define LOG(type, msg) MOZ_LOG(gMediaElementLog, type, msg)
+#define LOG_EVENT(type, msg) MOZ_LOG(gMediaElementEventsLog, type, msg)
 
 #include "nsIContentSecurityPolicy.h"
 
 #include "mozilla/Preferences.h"
 #include "mozilla/FloatingPoint.h"
 
 #include "nsIPermissionManager.h"
 #include "nsContentTypeParser.h"
--- a/dom/html/HTMLTrackElement.cpp
+++ b/dom/html/HTMLTrackElement.cpp
@@ -36,17 +36,17 @@
 #include "nsMappedAttributes.h"
 #include "nsNetUtil.h"
 #include "nsRuleData.h"
 #include "nsStyleConsts.h"
 #include "nsThreadUtils.h"
 #include "nsVideoFrame.h"
 
 static PRLogModuleInfo* gTrackElementLog;
-#define LOG(type, msg) PR_LOG(gTrackElementLog, type, msg)
+#define LOG(type, msg) MOZ_LOG(gTrackElementLog, type, msg)
 
 // Replace the usual NS_IMPL_NS_NEW_HTML_ELEMENT(Track) so
 // we can return an UnknownElement instead when pref'd off.
 nsGenericHTMLElement*
 NS_NewHTMLTrackElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
                        mozilla::dom::FromParser aFromParser)
 {
   if (!mozilla::dom::HTMLTrackElement::IsWebVTTEnabled()) {
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -105,17 +105,17 @@
 
 #if DISABLE_ASSERTS_FOR_FUZZING
 #define ASSERT_UNLESS_FUZZING(...) do { } while (0)
 #else
 #define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false, __VA_ARGS__)
 #endif
 
 #define IDB_DEBUG_LOG(_args)                                                   \
-  PR_LOG(IndexedDatabaseManager::GetLoggingModule(),                           \
+  MOZ_LOG(IndexedDatabaseManager::GetLoggingModule(),                           \
          PR_LOG_DEBUG,                                                         \
          _args )
 
 #if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
 #define IDB_MOBILE
 #endif
 
 namespace mozilla {
--- a/dom/indexedDB/ProfilerHelpers.h
+++ b/dom/indexedDB/ProfilerHelpers.h
@@ -292,17 +292,17 @@ LoggingHelper(bool aUseProfiler, const c
       va_list args;
       va_start(args, aFmt);
 
       message.AppendPrintf(aFmt, args);
 
       va_end(args);
     }
 
-    PR_LOG(logModule, logLevel, ("%s", message.get()));
+    MOZ_LOG(logModule, logLevel, ("%s", message.get()));
 
     if (aUseProfiler) {
       PROFILER_MARKER(message.get());
     }
   }
 }
 
 } // namespace indexedDB
--- a/dom/ipc/ProcessPriorityManager.cpp
+++ b/dom/ipc/ProcessPriorityManager.cpp
@@ -72,20 +72,20 @@
   GetPPMLog()
   {
     static PRLogModuleInfo *sLog;
     if (!sLog)
       sLog = PR_NewLogModule("ProcessPriorityManager");
     return sLog;
   }
 #  define LOG(fmt, ...) \
-     PR_LOG(GetPPMLog(), PR_LOG_DEBUG, \
+     MOZ_LOG(GetPPMLog(), PR_LOG_DEBUG, \
             ("ProcessPriorityManager - " fmt, ##__VA_ARGS__))
 #  define LOGP(fmt, ...) \
-     PR_LOG(GetPPMLog(), PR_LOG_DEBUG, \
+     MOZ_LOG(GetPPMLog(), PR_LOG_DEBUG, \
             ("ProcessPriorityManager[%schild-id=%" PRIu64 ", pid=%d] - " fmt, \
             NameWithComma().get(), \
             static_cast<uint64_t>(ChildID()), Pid(), ##__VA_ARGS__))
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::hal;
--- a/dom/media/AudioSink.cpp
+++ b/dom/media/AudioSink.cpp
@@ -7,19 +7,19 @@
 #include "MediaDecoderStateMachine.h"
 #include "AudioStream.h"
 #include "prenv.h"
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gMediaDecoderLog;
 #define SINK_LOG(msg, ...) \
-  PR_LOG(gMediaDecoderLog, PR_LOG_DEBUG, ("AudioSink=%p " msg, this, ##__VA_ARGS__))
+  MOZ_LOG(gMediaDecoderLog, PR_LOG_DEBUG, ("AudioSink=%p " msg, this, ##__VA_ARGS__))
 #define SINK_LOG_V(msg, ...) \
-  PR_LOG(gMediaDecoderLog, PR_LOG_DEBUG+1, ("AudioSink=%p " msg, this, ##__VA_ARGS__))
+  MOZ_LOG(gMediaDecoderLog, PR_LOG_DEBUG+1, ("AudioSink=%p " msg, this, ##__VA_ARGS__))
 
 AudioSink::OnAudioEndTimeUpdateTask::OnAudioEndTimeUpdateTask(
                                      MediaDecoderStateMachine* aStateMachine)
   : mMutex("OnAudioEndTimeUpdateTask")
   , mEndTime(0)
   , mStateMachine(aStateMachine)
 {
 }
--- a/dom/media/AudioStream.cpp
+++ b/dom/media/AudioStream.cpp
@@ -25,17 +25,17 @@
 namespace mozilla {
 
 #ifdef LOG
 #undef LOG
 #endif
 
 PRLogModuleInfo* gAudioStreamLog = nullptr;
 // For simple logs
-#define LOG(x) PR_LOG(gAudioStreamLog, PR_LOG_DEBUG, x)
+#define LOG(x) MOZ_LOG(gAudioStreamLog, PR_LOG_DEBUG, x)
 
 /**
  * When MOZ_DUMP_AUDIO is set in the environment (to anything),
  * we'll drop a series of files in the current working directory named
  * dumped-audio-<nnn>.wav, one per AudioStream created, containing
  * the audio for the stream including any skips due to underruns.
  */
 static int gDumpedAudioCount = 0;
@@ -324,17 +324,17 @@ AudioStream::Init(int32_t aNumChannels, 
 {
   mStartTime = TimeStamp::Now();
   mIsFirst = CubebUtils::GetFirstStream();
 
   if (!CubebUtils::GetCubebContext() || aNumChannels < 0 || aRate < 0) {
     return NS_ERROR_FAILURE;
   }
 
-  PR_LOG(gAudioStreamLog, PR_LOG_DEBUG,
+  MOZ_LOG(gAudioStreamLog, PR_LOG_DEBUG,
     ("%s  channels: %d, rate: %d for %p", __FUNCTION__, aNumChannels, aRate, this));
   mInRate = mOutRate = aRate;
   mChannels = aNumChannels;
   mOutChannels = (aNumChannels > 2) ? 2 : aNumChannels;
   mLatencyRequest = aLatencyRequest;
 
   mDumpFile = OpenDumpFile(this);
 
@@ -541,22 +541,22 @@ AudioStream::CheckForStart()
   mMonitor.AssertCurrentThreadOwns();
   if (mState == INITIALIZED) {
     // Start the stream right away when low latency has been requested. This means
     // that the DataCallback will feed silence to cubeb, until the first frames
     // are written to this AudioStream.  Also start if a start has been queued.
     if (mLatencyRequest == LowLatency || mNeedsStart) {
       StartUnlocked(); // mState = STARTED or ERRORED
       mNeedsStart = false;
-      PR_LOG(gAudioStreamLog, PR_LOG_WARNING,
+      MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING,
              ("Started waiting %s-latency stream",
               mLatencyRequest == LowLatency ? "low" : "high"));
     } else {
       // high latency, not full - OR Pause() was called before we got here
-      PR_LOG(gAudioStreamLog, PR_LOG_DEBUG,
+      MOZ_LOG(gAudioStreamLog, PR_LOG_DEBUG,
              ("Not starting waiting %s-latency stream",
               mLatencyRequest == LowLatency ? "low" : "high"));
     }
   }
 }
 
 NS_IMETHODIMP
 AudioInitTask::Run()
@@ -639,32 +639,32 @@ AudioStream::Write(const AudioDataValue*
       // Careful - the CubebInit thread may not have gotten to STARTED yet
       if ((mState == INITIALIZED || mState == STARTED) && mLatencyRequest == LowLatency) {
         // don't ever block MediaStreamGraph low-latency streams
         uint32_t remains = 0; // we presume the buffer is full
         if (mBuffer.Length() > bytesToCopy) {
           remains = mBuffer.Length() - bytesToCopy; // Free up just enough space
         }
         // account for dropping samples
-        PR_LOG(gAudioStreamLog, PR_LOG_WARNING, ("Stream %p dropping %u bytes (%u frames)in Write()",
+        MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING, ("Stream %p dropping %u bytes (%u frames)in Write()",
             this, mBuffer.Length() - remains, BytesToFrames(mBuffer.Length() - remains)));
         mReadPoint += BytesToFrames(mBuffer.Length() - remains);
         mBuffer.ContractTo(remains);
       } else { // RUNNING or high latency
         // If we are not playing, but our buffer is full, start playing to make
         // room for soon-to-be-decoded data.
         if (mState != STARTED && mState != RUNNING) {
-          PR_LOG(gAudioStreamLog, PR_LOG_WARNING, ("Starting stream %p in Write (%u waiting)",
+          MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING, ("Starting stream %p in Write (%u waiting)",
                                                  this, bytesToCopy));
           StartUnlocked();
           if (mState == ERRORED) {
             return NS_ERROR_FAILURE;
           }
         }
-        PR_LOG(gAudioStreamLog, PR_LOG_WARNING, ("Stream %p waiting in Write() (%u waiting)",
+        MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING, ("Stream %p waiting in Write() (%u waiting)",
                                                  this, bytesToCopy));
         mon.Wait();
       }
     }
   }
 
   mWritten += aFrames;
   return NS_OK;
@@ -1067,26 +1067,26 @@ AudioStream::DataCallback(void* aBuffer,
     // we start getting callbacks.
     // Simple version - contract on first callback only.
     if (mLatencyRequest == LowLatency) {
       uint32_t old_len = mBuffer.Length();
       available = mBuffer.ContractTo(FramesToBytes(aFrames));
       TimeStamp now = TimeStamp::Now();
       if (!mStartTime.IsNull()) {
         int64_t timeMs = (now - mStartTime).ToMilliseconds();
-        PR_LOG(gAudioStreamLog, PR_LOG_WARNING,
+        MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING,
                ("Stream took %lldms to start after first Write() @ %u", timeMs, mOutRate));
       } else {
-        PR_LOG(gAudioStreamLog, PR_LOG_WARNING,
+        MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING,
           ("Stream started before Write() @ %u", mOutRate));
       }
 
       if (old_len != available) {
         // Note that we may have dropped samples in Write() as well!
-        PR_LOG(gAudioStreamLog, PR_LOG_WARNING,
+        MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING,
                ("AudioStream %p dropped %u + %u initial frames @ %u", this,
                  mReadPoint, BytesToFrames(old_len - available), mOutRate));
         mReadPoint += BytesToFrames(old_len - available);
       }
     }
     mState = RUNNING;
   }
 
@@ -1117,17 +1117,17 @@ AudioStream::DataCallback(void* aBuffer,
 
   // Always send audible frames first, and silent frames later.
   // Otherwise it will break the assumption of FrameHistory.
   if (mState != DRAINING) {
     mAudioClock.UpdateFrameHistory(servicedFrames, underrunFrames);
     uint8_t* rpos = static_cast<uint8_t*>(aBuffer) + FramesToBytes(aFrames - underrunFrames);
     memset(rpos, 0, FramesToBytes(underrunFrames));
     if (underrunFrames) {
-      PR_LOG(gAudioStreamLog, PR_LOG_WARNING,
+      MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING,
              ("AudioStream %p lost %d frames", this, underrunFrames));
     }
     servicedFrames += underrunFrames;
   } else {
     mAudioClock.UpdateFrameHistory(servicedFrames, 0);
   }
 
   WriteDumpFile(mDumpFile, this, aFrames, aBuffer);
--- a/dom/media/GraphDriver.cpp
+++ b/dom/media/GraphDriver.cpp
@@ -6,17 +6,17 @@
 #include <MediaStreamGraphImpl.h>
 #include "CubebUtils.h"
 
 #ifdef XP_MACOSX
 #include <sys/sysctl.h>
 #endif
 
 extern PRLogModuleInfo* gMediaStreamGraphLog;
-#define STREAM_LOG(type, msg) PR_LOG(gMediaStreamGraphLog, type, msg)
+#define STREAM_LOG(type, msg) MOZ_LOG(gMediaStreamGraphLog, type, msg)
 
 // We don't use NSPR log here because we want this interleaved with adb logcat
 // on Android/B2G
 // #define ENABLE_LIFECYCLE_LOG
 #ifdef ENABLE_LIFECYCLE_LOG
 #ifdef ANDROID
 #include "android/log.h"
 #define LIFECYCLE_LOG(...)  __android_log_print(ANDROID_LOG_INFO, "Gecko - MSG" , __VA_ARGS__); printf(__VA_ARGS__);printf("\n");
@@ -314,17 +314,17 @@ void
 SystemClockDriver::GetIntervalForIteration(GraphTime& aFrom, GraphTime& aTo)
 {
   TimeStamp now = TimeStamp::Now();
   aFrom = mIterationStart = IterationEnd();
   aTo = mIterationEnd = mGraphImpl->SecondsToMediaTime((now - mCurrentTimeStamp).ToSeconds()) + IterationEnd();
 
   mCurrentTimeStamp = now;
 
-  PR_LOG(gMediaStreamGraphLog, PR_LOG_DEBUG+1, ("Updating current time to %f (real %f, mStateComputedTime %f)",
+  MOZ_LOG(gMediaStreamGraphLog, PR_LOG_DEBUG+1, ("Updating current time to %f (real %f, mStateComputedTime %f)",
          mGraphImpl->MediaTimeToSeconds(aTo),
          (now - mInitialTimeStamp).ToSeconds(),
          mGraphImpl->MediaTimeToSeconds(StateComputedTime())));
 
   if (mStateComputedTime < aTo) {
     STREAM_LOG(PR_LOG_WARNING, ("Media graph global underrun detected"));
     aTo = mIterationEnd = mStateComputedTime;
   }
--- a/dom/media/Latency.cpp
+++ b/dom/media/Latency.cpp
@@ -186,21 +186,21 @@ AsyncLatencyLogger::Observe(nsISupports*
   return NS_OK;
 }
 
 // aID is a sub-identifier (in particular a specific MediaStramTrack)
 void AsyncLatencyLogger::WriteLog(LatencyLogIndex aIndex, uint64_t aID, int64_t aValue,
                                   TimeStamp aTimeStamp)
 {
   if (aTimeStamp.IsNull()) {
-    PR_LOG(GetLatencyLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetLatencyLog(), PR_LOG_DEBUG,
       ("Latency: %s,%llu,%lld,%lld",
        LatencyLogIndex2Strings[aIndex], aID, GetTimeStamp(), aValue));
   } else {
-    PR_LOG(GetLatencyLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetLatencyLog(), PR_LOG_DEBUG,
       ("Latency: %s,%llu,%lld,%lld,%lld",
        LatencyLogIndex2Strings[aIndex], aID, GetTimeStamp(), aValue,
        static_cast<int64_t>((aTimeStamp - gAsyncLogger->mStart).ToMilliseconds())));
   }
 }
 
 int64_t AsyncLatencyLogger::GetTimeStamp()
 {
--- a/dom/media/MediaCache.cpp
+++ b/dom/media/MediaCache.cpp
@@ -20,17 +20,17 @@
 #include "nsIPrincipal.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Services.h"
 #include <algorithm>
 
 namespace mozilla {
 
 PRLogModuleInfo* gMediaCacheLog;
-#define CACHE_LOG(type, msg) PR_LOG(gMediaCacheLog, type, msg)
+#define CACHE_LOG(type, msg) MOZ_LOG(gMediaCacheLog, type, msg)
 
 // Readahead blocks for non-seekable streams will be limited to this
 // fraction of the cache space. We don't normally evict such blocks
 // because replacing them requires a seek, but we need to make sure
 // they don't monopolize the cache.
 static const double NONSEEKABLE_READAHEAD_MAX = 0.5;
 
 // Data N seconds before the current playback position is given the same priority
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -48,17 +48,17 @@ namespace mozilla {
 // fluctuating bitrates.
 static const int64_t CAN_PLAY_THROUGH_MARGIN = 1;
 
 // avoid redefined macro in unified build
 #undef DECODER_LOG
 
 PRLogModuleInfo* gMediaDecoderLog;
 #define DECODER_LOG(x, ...) \
-  PR_LOG(gMediaDecoderLog, PR_LOG_DEBUG, ("Decoder=%p " x, this, ##__VA_ARGS__))
+  MOZ_LOG(gMediaDecoderLog, PR_LOG_DEBUG, ("Decoder=%p " x, this, ##__VA_ARGS__))
 
 static const char* const gPlayStateStr[] = {
   "START",
   "LOADING",
   "PAUSED",
   "PLAYING",
   "SEEKING",
   "ENDED",
--- a/dom/media/MediaDecoderReader.cpp
+++ b/dom/media/MediaDecoderReader.cpp
@@ -17,17 +17,17 @@
 
 namespace mozilla {
 
 // Un-comment to enable logging of seek bisections.
 //#define SEEK_LOGGING
 
 extern PRLogModuleInfo* gMediaDecoderLog;
 #define DECODER_LOG(x, ...) \
-  PR_LOG(gMediaDecoderLog, PR_LOG_DEBUG, ("Decoder=%p " x, mDecoder, ##__VA_ARGS__))
+  MOZ_LOG(gMediaDecoderLog, PR_LOG_DEBUG, ("Decoder=%p " x, mDecoder, ##__VA_ARGS__))
 
 // Same workaround as MediaDecoderStateMachine.cpp.
 #define DECODER_WARN_HELPER(a, b) NS_WARNING b
 #define DECODER_WARN(x, ...) \
   DECODER_WARN_HELPER(0, (nsPrintfCString("Decoder=%p " x, mDecoder, ##__VA_ARGS__).get()))
 
 class VideoQueueMemoryFunctor : public nsDequeFunctor {
 public:
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -53,17 +53,17 @@ using namespace mozilla::gfx;
 // avoid redefined macro in unified build
 #undef LOG
 #undef DECODER_LOG
 #undef VERBOSE_LOG
 
 extern PRLogModuleInfo* gMediaDecoderLog;
 extern PRLogModuleInfo* gMediaSampleLog;
 #define LOG(m, l, x, ...) \
-  PR_LOG(m, l, ("Decoder=%p " x, mDecoder.get(), ##__VA_ARGS__))
+  MOZ_LOG(m, l, ("Decoder=%p " x, mDecoder.get(), ##__VA_ARGS__))
 #define DECODER_LOG(x, ...) \
   LOG(gMediaDecoderLog, PR_LOG_DEBUG, x, ##__VA_ARGS__)
 #define VERBOSE_LOG(x, ...) \
   LOG(gMediaDecoderLog, PR_LOG_DEBUG+1, x, ##__VA_ARGS__)
 #define SAMPLE_LOG(x, ...) \
   LOG(gMediaSampleLog, PR_LOG_DEBUG, x, ##__VA_ARGS__)
 
 // Somehow MSVC doesn't correctly delete the comma before ##__VA_ARGS__
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -30,18 +30,18 @@ using mozilla::layers::LayersBackend;
 
 PRLogModuleInfo* GetFormatDecoderLog() {
   static PRLogModuleInfo* log = nullptr;
   if (!log) {
     log = PR_NewLogModule("MediaFormatReader");
   }
   return log;
 }
-#define LOG(arg, ...) PR_LOG(GetFormatDecoderLog(), PR_LOG_DEBUG, ("MediaFormatReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
-#define LOGV(arg, ...) PR_LOG(GetFormatDecoderLog(), PR_LOG_DEBUG+1, ("MediaFormatReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define LOG(arg, ...) MOZ_LOG(GetFormatDecoderLog(), PR_LOG_DEBUG, ("MediaFormatReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define LOGV(arg, ...) MOZ_LOG(GetFormatDecoderLog(), PR_LOG_DEBUG+1, ("MediaFormatReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
 
 namespace mozilla {
 
 static const char*
 TrackTypeToStr(TrackInfo::TrackType aTrack)
 {
   MOZ_ASSERT(aTrack == TrackInfo::kAudioTrack ||
              aTrack == TrackInfo::kVideoTrack ||
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -106,17 +106,17 @@ namespace mozilla {
 PRLogModuleInfo*
 GetMediaManagerLog()
 {
   static PRLogModuleInfo *sLog;
   if (!sLog)
     sLog = PR_NewLogModule("MediaManager");
   return sLog;
 }
-#define LOG(msg) PR_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
+#define LOG(msg) MOZ_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
 
 using dom::File;
 using dom::MediaStreamConstraints;
 using dom::MediaTrackConstraintSet;
 using dom::MediaTrackConstraints;
 using dom::MediaStreamError;
 using dom::GetUserMediaRequest;
 using dom::Sequence;
--- a/dom/media/MediaManager.h
+++ b/dom/media/MediaManager.h
@@ -44,17 +44,17 @@
 
 namespace mozilla {
 namespace dom {
 struct MediaStreamConstraints;
 struct MediaTrackConstraintSet;
 }
 
 extern PRLogModuleInfo* GetMediaManagerLog();
-#define MM_LOG(msg) PR_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
+#define MM_LOG(msg) MOZ_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
 
 /**
  * This class is an implementation of MediaStreamListener. This is used
  * to Start() and Stop() the underlying MediaEngineSource when MediaStreams
  * are assigned and deassigned in content.
  */
 class GetUserMediaCallbackMediaStreamListener : public MediaStreamListener
 {
--- a/dom/media/MediaPromise.h
+++ b/dom/media/MediaPromise.h
@@ -26,17 +26,17 @@
 #endif
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gMediaPromiseLog;
 
 #define PROMISE_LOG(x, ...) \
   MOZ_ASSERT(gMediaPromiseLog); \
-  PR_LOG(gMediaPromiseLog, PR_LOG_DEBUG, (x, ##__VA_ARGS__))
+  MOZ_LOG(gMediaPromiseLog, PR_LOG_DEBUG, (x, ##__VA_ARGS__))
 
 /*
  * A promise manages an asynchronous request that may or may not be able to be
  * fulfilled immediately. When an API returns a promise, the consumer may attach
  * callbacks to be invoked (asynchronously, on a specified thread) when the
  * request is either completed (resolved) or cannot be completed (rejected).
  *
  * When IsExclusive is true, the MediaPromise does a release-mode assertion that
--- a/dom/media/MediaRecorder.cpp
+++ b/dom/media/MediaRecorder.cpp
@@ -27,17 +27,17 @@
 #include "nsTArray.h"
 #include "GeckoProfiler.h"
 
 #ifdef LOG
 #undef LOG
 #endif
 
 PRLogModuleInfo* gMediaRecorderLog;
-#define LOG(type, msg) PR_LOG(gMediaRecorderLog, type, msg)
+#define LOG(type, msg) MOZ_LOG(gMediaRecorderLog, type, msg)
 
 namespace mozilla {
 
 namespace dom {
 
 /**
 + * MediaRecorderReporter measures memory being used by the Media Recorder.
 + *
--- a/dom/media/MediaResource.cpp
+++ b/dom/media/MediaResource.cpp
@@ -29,17 +29,17 @@
 #include "nsIAsyncVerifyRedirectCallback.h"
 #include "nsContentUtils.h"
 #include "nsHostObjectProtocolHandler.h"
 #include <algorithm>
 #include "nsProxyRelease.h"
 #include "nsIContentPolicy.h"
 
 PRLogModuleInfo* gMediaResourceLog;
-#define RESOURCE_LOG(msg, ...) PR_LOG(gMediaResourceLog, PR_LOG_DEBUG, \
+#define RESOURCE_LOG(msg, ...) MOZ_LOG(gMediaResourceLog, PR_LOG_DEBUG, \
                                       (msg, ##__VA_ARGS__))
 // Debug logging macro with object pointer and class name.
 #define CMLOG(msg, ...) \
         RESOURCE_LOG("%p [ChannelMediaResource]: " msg, this, ##__VA_ARGS__)
 
 static const uint32_t HTTP_OK_CODE = 200;
 static const uint32_t HTTP_PARTIAL_RESPONSE_CODE = 206;
 
--- a/dom/media/MediaShutdownManager.cpp
+++ b/dom/media/MediaShutdownManager.cpp
@@ -9,17 +9,17 @@
 #include "mozilla/StaticPtr.h"
 #include "MediaDecoder.h"
 #include "SharedThreadPool.h"
 #include "mozilla/Logging.h"
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gMediaDecoderLog;
-#define DECODER_LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
+#define DECODER_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
 
 NS_IMPL_ISUPPORTS(MediaShutdownManager, nsIObserver)
 
 MediaShutdownManager::MediaShutdownManager()
   : mIsObservingShutdown(false),
     mIsDoingXPCOMShutDown(false)
 {
   MOZ_ASSERT(NS_IsMainThread());
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -37,17 +37,17 @@
 
 using namespace mozilla::layers;
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
 
 namespace mozilla {
 
 PRLogModuleInfo* gMediaStreamGraphLog;
-#define STREAM_LOG(type, msg) PR_LOG(gMediaStreamGraphLog, type, msg)
+#define STREAM_LOG(type, msg) MOZ_LOG(gMediaStreamGraphLog, type, msg)
 
 // #define ENABLE_LIFECYCLE_LOG
 
 // We don't use NSPR log here because we want this interleaved with adb logcat
 // on Android/B2G
 #ifdef ENABLE_LIFECYCLE_LOG
 #  ifdef ANDROID
 #    include "android/log.h"
--- a/dom/media/MediaTimer.h
+++ b/dom/media/MediaTimer.h
@@ -18,17 +18,17 @@
 #include "mozilla/TimeStamp.h"
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gMediaTimerLog;
 
 #define TIMER_LOG(x, ...) \
   MOZ_ASSERT(gMediaTimerLog); \
-  PR_LOG(gMediaTimerLog, PR_LOG_DEBUG, ("[MediaTimer=%p relative_t=%lld]" x, this, \
+  MOZ_LOG(gMediaTimerLog, PR_LOG_DEBUG, ("[MediaTimer=%p relative_t=%lld]" x, this, \
                                         RelativeMicroseconds(TimeStamp::Now()), ##__VA_ARGS__))
 
 // This promise type is only exclusive because so far there isn't a reason for
 // it not to be. Feel free to change that.
 typedef MediaPromise<bool, bool, /* IsExclusive = */ true> MediaTimerPromise;
 
 // Timers only know how to fire at a given thread, which creates an impedence
 // mismatch with code that operates with MediaTaskQueues. This class solves
--- a/dom/media/RtspMediaResource.cpp
+++ b/dom/media/RtspMediaResource.cpp
@@ -16,17 +16,17 @@
 #include "nsIStreamingProtocolService.h"
 #include "nsServiceManagerUtils.h"
 #ifdef NECKO_PROTOCOL_rtsp
 #include "mozilla/net/RtspChannelChild.h"
 #endif
 using namespace mozilla::net;
 
 PRLogModuleInfo* gRtspMediaResourceLog;
-#define RTSP_LOG(msg, ...) PR_LOG(gRtspMediaResourceLog, PR_LOG_DEBUG, \
+#define RTSP_LOG(msg, ...) MOZ_LOG(gRtspMediaResourceLog, PR_LOG_DEBUG, \
                                   (msg, ##__VA_ARGS__))
 // Debug logging macro with object pointer and class name.
 #define RTSPMLOG(msg, ...) \
         RTSP_LOG("%p [RtspMediaResource]: " msg, this, ##__VA_ARGS__)
 
 namespace mozilla {
 
 /* class RtspTrackBuffer: a ring buffer implementation for audio/video track
--- a/dom/media/StateMirroring.h
+++ b/dom/media/StateMirroring.h
@@ -45,17 +45,17 @@
 
 namespace mozilla {
 
 // Mirror<T> and Canonical<T> inherit WatchTarget, so we piggy-back on the
 // logging that WatchTarget already does. Given that, it makes sense to share
 // the same log module.
 #define MIRROR_LOG(x, ...) \
   MOZ_ASSERT(gStateWatchingLog); \
-  PR_LOG(gStateWatchingLog, PR_LOG_DEBUG, (x, ##__VA_ARGS__))
+  MOZ_LOG(gStateWatchingLog, PR_LOG_DEBUG, (x, ##__VA_ARGS__))
 
 template<typename T> class AbstractMirror;
 
 /*
  * AbstractCanonical is a superclass from which all Canonical values must
  * inherit. It serves as the interface of operations which may be performed (via
  * asynchronous dispatch) by other threads, in particular by the corresponding
  * Mirror value.
--- a/dom/media/StateWatching.h
+++ b/dom/media/StateWatching.h
@@ -55,17 +55,17 @@
  */
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gStateWatchingLog;
 
 #define WATCH_LOG(x, ...) \
   MOZ_ASSERT(gStateWatchingLog); \
-  PR_LOG(gStateWatchingLog, PR_LOG_DEBUG, (x, ##__VA_ARGS__))
+  MOZ_LOG(gStateWatchingLog, PR_LOG_DEBUG, (x, ##__VA_ARGS__))
 
 /*
  * AbstractWatcher is a superclass from which all watchers must inherit.
  */
 class AbstractWatcher
 {
 public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AbstractWatcher)
--- a/dom/media/StreamBuffer.cpp
+++ b/dom/media/StreamBuffer.cpp
@@ -5,17 +5,17 @@
 
 #include "StreamBuffer.h"
 #include "mozilla/Logging.h"
 #include <algorithm>
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gMediaStreamGraphLog;
-#define STREAM_LOG(type, msg) PR_LOG(gMediaStreamGraphLog, type, msg)
+#define STREAM_LOG(type, msg) MOZ_LOG(gMediaStreamGraphLog, type, msg)
 
 #ifdef DEBUG
 void
 StreamBuffer::DumpTrackInfo() const
 {
   STREAM_LOG(PR_LOG_ALWAYS, ("DumpTracks: mTracksKnownTime %lld", mTracksKnownTime));
   for (uint32_t i = 0; i < mTracks.Length(); ++i) {
     Track* track = mTracks[i];
--- a/dom/media/TrackUnionStream.cpp
+++ b/dom/media/TrackUnionStream.cpp
@@ -38,17 +38,17 @@ using namespace mozilla::gfx;
 
 namespace mozilla {
 
 #ifdef STREAM_LOG
 #undef STREAM_LOG
 #endif
 
 PRLogModuleInfo* gTrackUnionStreamLog;
-#define STREAM_LOG(type, msg) PR_LOG(gTrackUnionStreamLog, type, msg)
+#define STREAM_LOG(type, msg) MOZ_LOG(gTrackUnionStreamLog, type, msg)
 
 TrackUnionStream::TrackUnionStream(DOMMediaStream* aWrapper) :
   ProcessedMediaStream(aWrapper)
 {
   if (!gTrackUnionStreamLog) {
     gTrackUnionStreamLog = PR_NewLogModule("TrackUnionStream");
   }
 }
--- a/dom/media/WebVTTListener.cpp
+++ b/dom/media/WebVTTListener.cpp
@@ -24,17 +24,17 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
   NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIWebVTTListener)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(WebVTTListener)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(WebVTTListener)
 
 PRLogModuleInfo* gTextTrackLog;
-# define VTT_LOG(...) PR_LOG(gTextTrackLog, PR_LOG_DEBUG, (__VA_ARGS__))
+# define VTT_LOG(...) MOZ_LOG(gTextTrackLog, PR_LOG_DEBUG, (__VA_ARGS__))
 
 WebVTTListener::WebVTTListener(HTMLTrackElement* aElement)
   : mElement(aElement)
 {
   MOZ_ASSERT(mElement, "Must pass an element to the callback");
   if (!gTextTrackLog) {
     gTextTrackLog = PR_NewLogModule("TextTrack");
   }
--- a/dom/media/apple/AppleMP3Reader.cpp
+++ b/dom/media/apple/AppleMP3Reader.cpp
@@ -17,19 +17,19 @@
 // buffer we cannot use AudioCompactor without paying for an additional
 // allocation and copy.  Therefore, choosing a value that divides exactly into
 // 1152 is most memory efficient.
 #define MAX_AUDIO_FRAMES 128
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gMediaDecoderLog;
-#define LOGE(...) PR_LOG(gMediaDecoderLog, PR_LOG_ERROR, (__VA_ARGS__))
-#define LOGW(...) PR_LOG(gMediaDecoderLog, PR_LOG_WARNING, (__VA_ARGS__))
-#define LOGD(...) PR_LOG(gMediaDecoderLog, PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOGE(...) MOZ_LOG(gMediaDecoderLog, PR_LOG_ERROR, (__VA_ARGS__))
+#define LOGW(...) MOZ_LOG(gMediaDecoderLog, PR_LOG_WARNING, (__VA_ARGS__))
+#define LOGD(...) MOZ_LOG(gMediaDecoderLog, PR_LOG_DEBUG, (__VA_ARGS__))
 
 #define PROPERTY_ID_FORMAT "%c%c%c%c"
 #define PROPERTY_ID_PRINT(x) ((x) >> 24), \
                              ((x) >> 16) & 0xff, \
                              ((x) >> 8) & 0xff, \
                              (x) & 0xff
 
 AppleMP3Reader::AppleMP3Reader(AbstractMediaDecoder *aDecoder)
--- a/dom/media/directshow/AudioSinkFilter.cpp
+++ b/dom/media/directshow/AudioSinkFilter.cpp
@@ -19,17 +19,17 @@
 DEFINE_GUID(CLSID_MozAudioSinkFilter, 0x1872d8c8, 0xea8d, 0x4c34, 0xae, 0x96, 0x69, 0xde,
             0xf1, 0x33, 0x7b, 0x33);
 
 using namespace mozilla::media;
 
 namespace mozilla {
 
 PRLogModuleInfo* GetDirectShowLog();
-#define LOG(...) PR_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 AudioSinkFilter::AudioSinkFilter(const wchar_t* aObjectName, HRESULT* aOutResult)
   : BaseFilter(aObjectName, CLSID_MozAudioSinkFilter),
     mFilterCritSec("AudioSinkFilter::mFilterCritSec")
 {
   (*aOutResult) = S_OK;
   mInputPin = new AudioSinkInputPin(L"AudioSinkInputPin",
                                     this,
--- a/dom/media/directshow/AudioSinkInputPin.cpp
+++ b/dom/media/directshow/AudioSinkInputPin.cpp
@@ -11,17 +11,17 @@
 
 #include <wmsdkidl.h>
 
 using namespace mozilla::media;
 
 namespace mozilla {
 
 PRLogModuleInfo* GetDirectShowLog();
-#define LOG(...) PR_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 AudioSinkInputPin::AudioSinkInputPin(wchar_t* aObjectName,
                                      AudioSinkFilter* aFilter,
                                      mozilla::CriticalSection* aLock,
                                      HRESULT* aOutResult)
   : BaseInputPin(aObjectName, aFilter, aLock, aOutResult, aObjectName),
     mSegmentStartTime(0)
 {
--- a/dom/media/directshow/DirectShowReader.cpp
+++ b/dom/media/directshow/DirectShowReader.cpp
@@ -21,17 +21,17 @@ PRLogModuleInfo*
 GetDirectShowLog() {
   static PRLogModuleInfo* log = nullptr;
   if (!log) {
     log = PR_NewLogModule("DirectShowDecoder");
   }
   return log;
 }
 
-#define LOG(...) PR_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 DirectShowReader::DirectShowReader(AbstractMediaDecoder* aDecoder)
   : MediaDecoderReader(aDecoder),
     mMP3FrameParser(aDecoder->GetResource()->GetLength()),
 #ifdef DEBUG
     mRotRegister(0),
 #endif
     mNumChannels(0),
--- a/dom/media/directshow/SampleSink.cpp
+++ b/dom/media/directshow/SampleSink.cpp
@@ -10,17 +10,17 @@
 #include "VideoUtils.h"
 #include "mozilla/Logging.h"
 
 using namespace mozilla::media;
 
 namespace mozilla {
 
 PRLogModuleInfo* GetDirectShowLog();
-#define LOG(...) PR_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 SampleSink::SampleSink()
   : mMonitor("SampleSink"),
     mIsFlushing(false),
     mAtEOS(false)
 {
   MOZ_COUNT_CTOR(SampleSink);
 }
--- a/dom/media/directshow/SourceFilter.cpp
+++ b/dom/media/directshow/SourceFilter.cpp
@@ -16,17 +16,17 @@ using namespace mozilla::media;
 
 namespace mozilla {
 
 // Define to trace what's on...
 //#define DEBUG_SOURCE_TRACE 1
 
 #if defined (DEBUG_SOURCE_TRACE)
 PRLogModuleInfo* GetDirectShowLog();
-#define DIRECTSHOW_LOG(...) PR_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define DIRECTSHOW_LOG(...) MOZ_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 #else
 #define DIRECTSHOW_LOG(...)
 #endif
 
 static HRESULT
 DoGetInterface(IUnknown* aUnknown, void** aInterface)
 {
   if (!aInterface)
--- a/dom/media/eme/EMEUtils.h
+++ b/dom/media/eme/EMEUtils.h
@@ -9,23 +9,23 @@
 
 #include "mozilla/Logging.h"
 #include "nsString.h"
 
 namespace mozilla {
 
 #ifndef EME_LOG
   PRLogModuleInfo* GetEMELog();
-  #define EME_LOG(...) PR_LOG(GetEMELog(), PR_LOG_DEBUG, (__VA_ARGS__))
+  #define EME_LOG(...) MOZ_LOG(GetEMELog(), PR_LOG_DEBUG, (__VA_ARGS__))
   #define EME_LOG_ENABLED() PR_LOG_TEST(GetEMELog(), PR_LOG_DEBUG)
 #endif
 
 #ifndef EME_VERBOSE_LOG
   PRLogModuleInfo* GetEMEVerboseLog();
-  #define EME_VERBOSE_LOG(...) PR_LOG(GetEMEVerboseLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+  #define EME_VERBOSE_LOG(...) MOZ_LOG(GetEMEVerboseLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 #else
   #ifndef EME_LOG
     #define EME_LOG(...)
   #endif
 
   #ifndef EME_VERBOSE_LOG
     #define EME_VERBOSE_LOG(...)
   #endif
--- a/dom/media/encoder/MediaEncoder.cpp
+++ b/dom/media/encoder/MediaEncoder.cpp
@@ -27,17 +27,17 @@
 #include "ISOMediaWriter.h"
 #endif
 
 #ifdef LOG
 #undef LOG
 #endif
 
 PRLogModuleInfo* gMediaEncoderLog;
-#define LOG(type, msg) PR_LOG(gMediaEncoderLog, type, msg)
+#define LOG(type, msg) MOZ_LOG(gMediaEncoderLog, type, msg)
 
 namespace mozilla {
 
 void
 MediaEncoder::NotifyQueuedTrackChanges(MediaStreamGraph* aGraph,
                                        TrackID aID,
                                        StreamTime aTrackOffset,
                                        uint32_t aTrackEvents,
--- a/dom/media/encoder/TrackEncoder.cpp
+++ b/dom/media/encoder/TrackEncoder.cpp
@@ -14,17 +14,17 @@
 #define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "MediaEncoder", ## args);
 #else
 #define LOG(args, ...)
 #endif
 
 namespace mozilla {
 
 PRLogModuleInfo* gTrackEncoderLog;
-#define TRACK_LOG(type, msg) PR_LOG(gTrackEncoderLog, type, msg)
+#define TRACK_LOG(type, msg) MOZ_LOG(gTrackEncoderLog, type, msg)
 
 static const int DEFAULT_CHANNELS = 1;
 static const int DEFAULT_SAMPLING_RATE = 16000;
 static const int DEFAULT_FRAME_WIDTH = 640;
 static const int DEFAULT_FRAME_HEIGHT = 480;
 static const int DEFAULT_TRACK_RATE = USECS_PER_S;
 
 TrackEncoder::TrackEncoder()
--- a/dom/media/encoder/VP8TrackEncoder.cpp
+++ b/dom/media/encoder/VP8TrackEncoder.cpp
@@ -11,17 +11,17 @@
 #include "prsystem.h"
 #include "WebMWriter.h"
 #include "libyuv.h"
 #include "GeckoProfiler.h"
 
 namespace mozilla {
 
 PRLogModuleInfo* gVP8TrackEncoderLog;
-#define VP8LOG(msg, ...) PR_LOG(gVP8TrackEncoderLog, PR_LOG_DEBUG, \
+#define VP8LOG(msg, ...) MOZ_LOG(gVP8TrackEncoderLog, PR_LOG_DEBUG, \
                                   (msg, ##__VA_ARGS__))
 // Debug logging macro with object pointer and class name.
 
 #define DEFAULT_BITRATE 2500 // in kbit/s
 #define DEFAULT_ENCODE_FRAMERATE 30
 
 using namespace mozilla::layers;
 
--- a/dom/media/encoder/VorbisTrackEncoder.cpp
+++ b/dom/media/encoder/VorbisTrackEncoder.cpp
@@ -13,17 +13,17 @@
 // Example quality mode .4: 44kHz stereo coupled, roughly 128kbps VBR
 // ret = vorbis_encode_init_vbr(&vi,2,44100,.4);
 static const float BASE_QUALITY = 0.4f;
 
 namespace mozilla {
 
 #undef LOG
 PRLogModuleInfo* gVorbisTrackEncoderLog;
-#define VORBISLOG(msg, ...) PR_LOG(gVorbisTrackEncoderLog, PR_LOG_DEBUG, \
+#define VORBISLOG(msg, ...) MOZ_LOG(gVorbisTrackEncoderLog, PR_LOG_DEBUG, \
                              (msg, ##__VA_ARGS__))
 
 VorbisTrackEncoder::VorbisTrackEncoder()
   : AudioTrackEncoder()
 {
   MOZ_COUNT_CTOR(VorbisTrackEncoder);
   if (!gVorbisTrackEncoderLog) {
     gVorbisTrackEncoderLog = PR_NewLogModule("VorbisTrackEncoder");
--- a/dom/media/fmp4/MP4Reader.cpp
+++ b/dom/media/fmp4/MP4Reader.cpp
@@ -35,18 +35,18 @@ using mozilla::layers::LayersBackend;
 
 PRLogModuleInfo* GetDemuxerLog() {
   static PRLogModuleInfo* log = nullptr;
   if (!log) {
     log = PR_NewLogModule("MP4Demuxer");
   }
   return log;
 }
-#define LOG(arg, ...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, ("MP4Reader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
-#define VLOG(arg, ...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, ("MP4Reader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define LOG(arg, ...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, ("MP4Reader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define VLOG(arg, ...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, ("MP4Reader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
 
 using namespace mp4_demuxer;
 
 namespace mozilla {
 
 // Uncomment to enable verbose per-sample logging.
 //#define LOG_SAMPLE_DECODE 1
 
--- a/dom/media/gmp/GMPAudioDecoderParent.cpp
+++ b/dom/media/gmp/GMPAudioDecoderParent.cpp
@@ -14,18 +14,18 @@
 namespace mozilla {
 
 #ifdef LOG
 #undef LOG
 #endif
 
 extern PRLogModuleInfo* GetGMPLog();
 
-#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
-#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
+#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
+#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 namespace gmp {
 
 GMPAudioDecoderParent::GMPAudioDecoderParent(GMPContentParent* aPlugin)
   : mIsOpen(false)
   , mShuttingDown(false)
   , mActorDestroyed(false)
   , mPlugin(aPlugin)
--- a/dom/media/gmp/GMPChild.cpp
+++ b/dom/media/gmp/GMPChild.cpp
@@ -41,17 +41,17 @@ static const int MAX_VOUCHER_LENGTH = 50
 #endif
 
 namespace mozilla {
 
 #undef LOG
 #undef LOGD
 
 extern PRLogModuleInfo* GetGMPLog();
-#define LOG(level, x, ...) PR_LOG(GetGMPLog(), (level), (x, ##__VA_ARGS__))
+#define LOG(level, x, ...) MOZ_LOG(GetGMPLog(), (level), (x, ##__VA_ARGS__))
 #define LOGD(x, ...) LOG(PR_LOG_DEBUG, "GMPChild[pid=%d] " x, (int)base::GetCurrentProcId(), ##__VA_ARGS__)
 
 namespace gmp {
 
 GMPChild::GMPChild()
   : mAsyncShutdown(nullptr)
   , mGMPMessageLoop(MessageLoop::current())
   , mGMPLoader(nullptr)
--- a/dom/media/gmp/GMPContentParent.cpp
+++ b/dom/media/gmp/GMPContentParent.cpp
@@ -16,18 +16,18 @@
 namespace mozilla {
 
 #ifdef LOG
 #undef LOG
 #endif
 
 extern PRLogModuleInfo* GetGMPLog();
 
-#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
-#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
+#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
+#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 #ifdef __CLASS__
 #undef __CLASS__
 #endif
 #define __CLASS__ "GMPContentParent"
 
 namespace gmp {
 
--- a/dom/media/gmp/GMPParent.cpp
+++ b/dom/media/gmp/GMPParent.cpp
@@ -37,17 +37,17 @@ using CrashReporter::GetIDFromMinidump;
 #include "mozilla/Telemetry.h"
 
 namespace mozilla {
 
 #undef LOG
 #undef LOGD
 
 extern PRLogModuleInfo* GetGMPLog();
-#define LOG(level, x, ...) PR_LOG(GetGMPLog(), (level), (x, ##__VA_ARGS__))
+#define LOG(level, x, ...) MOZ_LOG(GetGMPLog(), (level), (x, ##__VA_ARGS__))
 #define LOGD(x, ...) LOG(PR_LOG_DEBUG, "GMPParent[%p|childPid=%d] " x, this, mChildPid, ##__VA_ARGS__)
 
 namespace gmp {
 
 GMPParent::GMPParent()
   : mState(GMPStateNotLoaded)
   , mProcess(nullptr)
   , mDeleteProcessOnlyOnUnload(false)
--- a/dom/media/gmp/GMPService.cpp
+++ b/dom/media/gmp/GMPService.cpp
@@ -45,18 +45,18 @@ PRLogModuleInfo*
 GetGMPLog()
 {
   static PRLogModuleInfo *sLog;
   if (!sLog)
     sLog = PR_NewLogModule("GMP");
   return sLog;
 }
 
-#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
-#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
+#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
+#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 #ifdef __CLASS__
 #undef __CLASS__
 #endif
 #define __CLASS__ "GMPService"
 
 namespace gmp {
 
--- a/dom/media/gmp/GMPServiceChild.cpp
+++ b/dom/media/gmp/GMPServiceChild.cpp
@@ -7,18 +7,18 @@
 #include "mozilla/dom/ContentChild.h"
 
 namespace mozilla {
 
 #ifdef LOG
 #undef LOG
 #endif
 
-#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
-#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
+#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
+#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 #ifdef __CLASS__
 #undef __CLASS__
 #endif
 #define __CLASS__ "GMPService"
 
 namespace gmp {
 
--- a/dom/media/gmp/GMPServiceParent.cpp
+++ b/dom/media/gmp/GMPServiceParent.cpp
@@ -35,18 +35,18 @@
 #include "nsISimpleEnumerator.h"
 
 namespace mozilla {
 
 #ifdef LOG
 #undef LOG
 #endif
 
-#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
-#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
+#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
+#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 #ifdef __CLASS__
 #undef __CLASS__
 #endif
 #define __CLASS__ "GMPService"
 
 namespace gmp {
 
--- a/dom/media/gmp/GMPStorageParent.cpp
+++ b/dom/media/gmp/GMPStorageParent.cpp
@@ -23,18 +23,18 @@
 namespace mozilla {
 
 #ifdef LOG
 #undef LOG
 #endif
 
 extern PRLogModuleInfo* GetGMPLog();
 
-#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
-#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
+#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
+#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 #ifdef __CLASS__
 #undef __CLASS__
 #endif
 #define __CLASS__ "GMPStorageParent"
 
 namespace gmp {
 
--- a/dom/media/gmp/GMPTimerParent.cpp
+++ b/dom/media/gmp/GMPTimerParent.cpp
@@ -10,18 +10,18 @@
 namespace mozilla {
 
 #ifdef LOG
 #undef LOG
 #endif
 
 extern PRLogModuleInfo* GetGMPLog();
 
-#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
-#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
+#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
+#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 #ifdef __CLASS__
 #undef __CLASS__
 #endif
 #define __CLASS__ "GMPParent"
 
 namespace gmp {
 
--- a/dom/media/gmp/GMPVideoDecoderParent.cpp
+++ b/dom/media/gmp/GMPVideoDecoderParent.cpp
@@ -18,18 +18,18 @@
 namespace mozilla {
 
 #ifdef LOG
 #undef LOG
 #endif
 
 extern PRLogModuleInfo* GetGMPLog();
 
-#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
-#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
+#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
+#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 namespace gmp {
 
 // States:
 // Initial: mIsOpen == false
 //    on InitDecode success -> Open
 //    on Shutdown -> Dead
 // Open: mIsOpen == true
--- a/dom/media/gmp/GMPVideoEncoderParent.cpp
+++ b/dom/media/gmp/GMPVideoEncoderParent.cpp
@@ -20,18 +20,18 @@
 namespace mozilla {
 
 #ifdef LOG
 #undef LOG
 #endif
 
 extern PRLogModuleInfo* GetGMPLog();
 
-#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
-#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
+#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
+#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 #ifdef __CLASS__
 #undef __CLASS__
 #endif
 #define __CLASS__ "GMPVideoEncoderParent"
 
 namespace gmp {
 
--- a/dom/media/gstreamer/GStreamerReader.cpp
+++ b/dom/media/gstreamer/GStreamerReader.cpp
@@ -26,17 +26,17 @@ namespace mozilla {
 using namespace gfx;
 using namespace layers;
 
 // Un-comment to enable logging of seek bisections.
 //#define SEEK_LOGGING
 
 extern PRLogModuleInfo* gMediaDecoderLog;
 #define LOG(type, msg, ...) \
-  PR_LOG(gMediaDecoderLog, type, ("GStreamerReader(%p) " msg, this, ##__VA_ARGS__))
+  MOZ_LOG(gMediaDecoderLog, type, ("GStreamerReader(%p) " msg, this, ##__VA_ARGS__))
 
 #if DEBUG
 static const unsigned int MAX_CHANNELS = 4;
 #endif
 // Let the demuxer work in pull mode for short files. This used to be a micro
 // optimization to have more accurate durations for ogg files in mochitests.
 // Since as of today we aren't using gstreamer to demux ogg, and having demuxers
 // work in pull mode over http makes them slower (since they really assume
--- a/dom/media/imagecapture/ImageCapture.h
+++ b/dom/media/imagecapture/ImageCapture.h
@@ -10,17 +10,17 @@
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/dom/ImageCaptureBinding.h"
 #include "mozilla/Logging.h"
 
 namespace mozilla {
 
 #ifndef IC_LOG
 PRLogModuleInfo* GetICLog();
-#define IC_LOG(...) PR_LOG(GetICLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define IC_LOG(...) MOZ_LOG(GetICLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 #endif
 
 namespace dom {
 
 class Blob;
 class VideoStreamTrack;
 
 /**
--- a/dom/media/mediasource/ContainerParser.cpp
+++ b/dom/media/mediasource/ContainerParser.cpp
@@ -20,17 +20,17 @@ extern PRLogModuleInfo* GetMediaSourceLo
 
 /* Polyfill __func__ on MSVC to pass to the log. */
 #ifdef _MSC_VER
 #define __func__ __FUNCTION__
 #endif
 
 #define STRINGIFY(x) #x
 #define TOSTRING(x) STRINGIFY(x)
-#define MSE_DEBUG(name, arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, (TOSTRING(name) "(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
+#define MSE_DEBUG(name, arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, (TOSTRING(name) "(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
 
 namespace mozilla {
 
 ContainerParser::ContainerParser(const nsACString& aType)
   : mHasInitData(false)
   , mType(aType)
 {
 }
--- a/dom/media/mediasource/MediaSource.cpp
+++ b/dom/media/mediasource/MediaSource.cpp
@@ -52,18 +52,18 @@ PRLogModuleInfo* GetMediaSourceAPILog()
 {
   static PRLogModuleInfo* sLogModule;
   if (!sLogModule) {
     sLogModule = PR_NewLogModule("MediaSource");
   }
   return sLogModule;
 }
 
-#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSource(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
-#define MSE_API(arg, ...) PR_LOG(GetMediaSourceAPILog(), PR_LOG_DEBUG, ("MediaSource(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSource(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define MSE_API(arg, ...) MOZ_LOG(GetMediaSourceAPILog(), PR_LOG_DEBUG, ("MediaSource(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
 
 // Arbitrary limit.
 static const unsigned int MAX_SOURCE_BUFFERS = 16;
 
 namespace mozilla {
 
 static const char* const gMediaSourceTypes[6] = {
   "video/mp4",
--- a/dom/media/mediasource/MediaSourceDecoder.cpp
+++ b/dom/media/mediasource/MediaSourceDecoder.cpp
@@ -12,18 +12,18 @@
 #include "MediaSourceReader.h"
 #include "MediaSourceResource.h"
 #include "MediaSourceUtils.h"
 #include "SourceBufferDecoder.h"
 #include "VideoUtils.h"
 
 extern PRLogModuleInfo* GetMediaSourceLog();
 
-#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSourceDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
-#define MSE_DEBUGV(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG + 1, ("MediaSourceDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSourceDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define MSE_DEBUGV(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG + 1, ("MediaSourceDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
 
 namespace mozilla {
 
 class SourceBufferDecoder;
 
 MediaSourceDecoder::MediaSourceDecoder(dom::HTMLMediaElement* aElement)
   : mMediaSource(nullptr)
   , mMediaSourceDuration(UnspecifiedNaN<double>())
--- a/dom/media/mediasource/MediaSourceReader.cpp
+++ b/dom/media/mediasource/MediaSourceReader.cpp
@@ -20,18 +20,18 @@
 #include "SharedDecoderManager.h"
 #include "MP4Decoder.h"
 #include "MP4Demuxer.h"
 #include "MP4Reader.h"
 #endif
 
 extern PRLogModuleInfo* GetMediaSourceLog();
 
-#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSourceReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
-#define MSE_DEBUGV(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG + 1, ("MediaSourceReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSourceReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define MSE_DEBUGV(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG + 1, ("MediaSourceReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
 
 // When a stream hits EOS it needs to decide what other stream to switch to. Due
 // to inaccuracies is determining buffer end frames (Bug 1065207) and rounding
 // issues we use a fuzz factor to determine the end time of this stream for
 // switching to the new stream. This value is based on the end of frame
 // default value used in Blink, kDefaultBufferDurationInMs.
 #define EOS_FUZZ_US 125000
 
--- a/dom/media/mediasource/MediaSourceResource.h
+++ b/dom/media/mediasource/MediaSourceResource.h
@@ -8,17 +8,17 @@
 #define MOZILLA_MEDIASOURCERESOURCE_H_
 
 #include "MediaResource.h"
 #include "mozilla/Monitor.h"
 #include "mozilla/Logging.h"
 
 extern PRLogModuleInfo* GetMediaSourceLog();
 
-#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSourceResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
+#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSourceResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
 
 #define UNIMPLEMENTED() MSE_DEBUG("UNIMPLEMENTED FUNCTION at %s:%d", __FILE__, __LINE__)
 
 namespace mozilla {
 
 class MediaSourceResource final : public MediaResource
 {
 public:
--- a/dom/media/mediasource/ResourceQueue.cpp
+++ b/dom/media/mediasource/ResourceQueue.cpp
@@ -10,18 +10,18 @@
 
 extern PRLogModuleInfo* GetSourceBufferResourceLog();
 
 /* Polyfill __func__ on MSVC to pass to the log. */
 #ifdef _MSC_VER
 #define __func__ __FUNCTION__
 #endif
 
-#define SBR_DEBUG(arg, ...) PR_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG, ("ResourceQueue(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
-#define SBR_DEBUGV(arg, ...) PR_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG+1, ("ResourceQueue(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define SBR_DEBUG(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG, ("ResourceQueue(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define SBR_DEBUGV(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG+1, ("ResourceQueue(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
 
 namespace mozilla {
 
 ResourceItem::ResourceItem(MediaLargeByteBuffer* aData)
   : mData(aData)
 {
 }
 
--- a/dom/media/mediasource/SourceBuffer.cpp
+++ b/dom/media/mediasource/SourceBuffer.cpp
@@ -24,19 +24,19 @@
 #include "TimeUnits.h"
 
 struct JSContext;
 class JSObject;
 
 extern PRLogModuleInfo* GetMediaSourceLog();
 extern PRLogModuleInfo* GetMediaSourceAPILog();
 
-#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
-#define MSE_DEBUGV(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG + 1, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
-#define MSE_API(arg, ...) PR_LOG(GetMediaSourceAPILog(), PR_LOG_DEBUG, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
+#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
+#define MSE_DEBUGV(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG + 1, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
+#define MSE_API(arg, ...) MOZ_LOG(GetMediaSourceAPILog(), PR_LOG_DEBUG, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
 
 namespace mozilla {
 
 namespace dom {
 
 class AppendDataRunnable : public nsRunnable {
 public:
   AppendDataRunnable(SourceBuffer* aSourceBuffer,
--- a/dom/media/mediasource/SourceBufferDecoder.cpp
+++ b/dom/media/mediasource/SourceBufferDecoder.cpp
@@ -11,17 +11,17 @@
 #include "MediaDecoderReader.h"
 
 extern PRLogModuleInfo* GetMediaSourceLog();
 /* Polyfill __func__ on MSVC to pass to the log. */
 #ifdef _MSC_VER
 #define __func__ __FUNCTION__
 #endif
 
-#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("SourceBufferDecoder(%p:%s)::%s: " arg, this, mResource->GetContentType().get(), __func__, ##__VA_ARGS__))
+#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("SourceBufferDecoder(%p:%s)::%s: " arg, this, mResource->GetContentType().get(), __func__, ##__VA_ARGS__))
 
 namespace mozilla {
 
 class ReentrantMonitor;
 
 namespace layers {
 
 class ImageContainer;
--- a/dom/media/mediasource/SourceBufferList.cpp
+++ b/dom/media/mediasource/SourceBufferList.cpp
@@ -14,18 +14,18 @@
 #include "nsIRunnable.h"
 #include "nsString.h"
 #include "nsThreadUtils.h"
 #include "mozilla/Logging.h"
 
 extern PRLogModuleInfo* GetMediaSourceLog();
 extern PRLogModuleInfo* GetMediaSourceAPILog();
 
-#define MSE_API(arg, ...) PR_LOG(GetMediaSourceAPILog(), PR_LOG_DEBUG, ("SourceBufferList(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
-#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("SourceBufferList(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define MSE_API(arg, ...) MOZ_LOG(GetMediaSourceAPILog(), PR_LOG_DEBUG, ("SourceBufferList(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("SourceBufferList(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
 
 struct JSContext;
 class JSObject;
 
 namespace mozilla {
 
 namespace dom {
 
--- a/dom/media/mediasource/SourceBufferResource.cpp
+++ b/dom/media/mediasource/SourceBufferResource.cpp
@@ -17,18 +17,18 @@ PRLogModuleInfo* GetSourceBufferResource
 {
   static PRLogModuleInfo* sLogModule;
   if (!sLogModule) {
     sLogModule = PR_NewLogModule("SourceBufferResource");
   }
   return sLogModule;
 }
 
-#define SBR_DEBUG(arg, ...) PR_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG, ("SourceBufferResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
-#define SBR_DEBUGV(arg, ...) PR_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG+1, ("SourceBufferResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
+#define SBR_DEBUG(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG, ("SourceBufferResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
+#define SBR_DEBUGV(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG+1, ("SourceBufferResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
 
 namespace mozilla {
 
 nsresult
 SourceBufferResource::Close()
 {
   ReentrantMonitorAutoEnter mon(mMonitor);
   SBR_DEBUG("Close");
--- a/dom/media/mediasource/TrackBuffer.cpp
+++ b/dom/media/mediasource/TrackBuffer.cpp
@@ -19,17 +19,17 @@
 #include "mozilla/TypeTraits.h"
 #include "nsError.h"
 #include "nsIRunnable.h"
 #include "nsThreadUtils.h"
 #include "mozilla/Logging.h"
 
 extern PRLogModuleInfo* GetMediaSourceLog();
 
-#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("TrackBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
+#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("TrackBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
 
 // Time in seconds to substract from the current time when deciding the
 // time point to evict data before in a decoder. This is used to help
 // prevent evicting the current playback point.
 #define MSE_EVICT_THRESHOLD_TIME 2.0
 
 // Time in microsecond under which a timestamp will be considered to be 0.
 #define FUZZ_TIMESTAMP_OFFSET 100000
--- a/dom/media/ogg/OggCodecState.cpp
+++ b/dom/media/ogg/OggCodecState.cpp
@@ -28,17 +28,17 @@
 #ifdef version_minor
 #undef version_minor
 #endif
 #endif
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gMediaDecoderLog;
-#define LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
+#define LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
 
 /** Decoder base class for Ogg-encapsulated streams. */
 OggCodecState*
 OggCodecState::Create(ogg_page* aPage)
 {
   NS_ASSERTION(ogg_page_bos(aPage), "Only call on BOS page!");
   nsAutoPtr<OggCodecState> codecState;
   if (aPage->body_len > 6 && memcmp(aPage->body+1, "theora", 6) == 0) {
--- a/dom/media/ogg/OggReader.cpp
+++ b/dom/media/ogg/OggReader.cpp
@@ -32,19 +32,19 @@ namespace mozilla {
 #ifdef MOZ_WIDGET_GONK
 #define OGG_ESTIMATE_BUFFERED 1
 #endif
 
 // Un-comment to enable logging of seek bisections.
 //#define SEEK_LOGGING
 
 extern PRLogModuleInfo* gMediaDecoderLog;
-#define LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
+#define LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
 #ifdef SEEK_LOGGING
-#define SEEK_LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
+#define SEEK_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
 #else
 #define SEEK_LOG(type, msg)
 #endif
 
 // The number of microseconds of "fuzz" we use in a bisection search over
 // HTTP. When we're seeking with fuzz, we'll stop the search if a bisection
 // lands between the seek target and SEEK_FUZZ_USECS microseconds before the
 // seek target.  This is becaue it's usually quicker to just keep downloading
--- a/dom/media/ogg/OpusParser.cpp
+++ b/dom/media/ogg/OpusParser.cpp
@@ -20,17 +20,17 @@
 #include "opus/opus.h"
 extern "C" {
 #include "opus/opus_multistream.h"
 }
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gMediaDecoderLog;
-#define OPUS_LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
+#define OPUS_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
 
 OpusParser::OpusParser():
   mRate(0),
   mNominalRate(0),
   mChannels(0),
   mPreSkip(0),
 #ifdef MOZ_SAMPLE_TYPE_FLOAT32
   mGain(1.0f),
--- a/dom/media/omx/AudioOffloadPlayer.cpp
+++ b/dom/media/omx/AudioOffloadPlayer.cpp
@@ -39,17 +39,17 @@
 #include <hardware/audio.h>
 
 using namespace android;
 
 namespace mozilla {
 
 PRLogModuleInfo* gAudioOffloadPlayerLog;
 #define AUDIO_OFFLOAD_LOG(type, msg) \
-  PR_LOG(gAudioOffloadPlayerLog, type, msg)
+  MOZ_LOG(gAudioOffloadPlayerLog, type, msg)
 
 // maximum time in paused state when offloading audio decompression.
 // When elapsed, the GonkAudioSink is destroyed to allow the audio DSP to power down.
 static const uint64_t OFFLOAD_PAUSE_MAX_MSECS = 60000ll;
 
 AudioOffloadPlayer::AudioOffloadPlayer(MediaOmxCommonDecoder* aObserver) :
   mStarted(false),
   mPlaying(false),
--- a/dom/media/omx/AudioOutput.cpp
+++ b/dom/media/omx/AudioOutput.cpp
@@ -15,23 +15,23 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 #include <stagefright/foundation/ADebug.h>
 #include "AudioOutput.h"
 
-#include "prlog.h"
+#include "mozilla/Logging.h"
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gAudioOffloadPlayerLog;
 #define AUDIO_OFFLOAD_LOG(type, msg) \
-  PR_LOG(gAudioOffloadPlayerLog, type, msg)
+  MOZ_LOG(gAudioOffloadPlayerLog, type, msg)
 
 using namespace android;
 
 AudioOutput::AudioOutput(int aSessionId, int aUid) :
   mCallbackCookie(nullptr),
   mCallback(nullptr),
   mCallbackData(nullptr),
   mUid(aUid),
--- a/dom/media/omx/I420ColorConverterHelper.cpp
+++ b/dom/media/omx/I420ColorConverterHelper.cpp
@@ -6,17 +6,17 @@
 
 #include "I420ColorConverterHelper.h"
 
 #include <dlfcn.h>
 
 #include "mozilla/Logging.h"
 
 PRLogModuleInfo *gI420ColorConverterHelperLog;
-#define LOG(msg...) PR_LOG(gI420ColorConverterHelperLog, PR_LOG_WARNING, (msg))
+#define LOG(msg...) MOZ_LOG(gI420ColorConverterHelperLog, PR_LOG_WARNING, (msg))
 
 namespace android {
 
 I420ColorConverterHelper::I420ColorConverterHelper()
   : mHandle(nullptr)
   , mConverter({nullptr, nullptr, nullptr, nullptr, nullptr})
 {
   if (!gI420ColorConverterHelperLog) {
--- a/dom/media/omx/MediaOmxCommonDecoder.cpp
+++ b/dom/media/omx/MediaOmxCommonDecoder.cpp
@@ -16,17 +16,17 @@
 #include "AudioOffloadPlayer.h"
 #endif
 
 using namespace android;
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gMediaDecoderLog;
-#define DECODER_LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
+#define DECODER_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
 
 MediaOmxCommonDecoder::MediaOmxCommonDecoder()
   : MediaDecoder()
   , mReader(nullptr)
   , mCanOffloadAudio(false)
   , mFallbackToStateMachine(false)
 {
   if (!gMediaDecoderLog) {
--- a/dom/media/omx/MediaOmxCommonReader.cpp
+++ b/dom/media/omx/MediaOmxCommonReader.cpp
@@ -18,17 +18,17 @@
 #include <stagefright/MetaData.h>
 #endif
 
 using namespace android;
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gMediaDecoderLog;
-#define DECODER_LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
+#define DECODER_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
 
 MediaOmxCommonReader::MediaOmxCommonReader(AbstractMediaDecoder *aDecoder)
   : MediaDecoderReader(aDecoder)
 {
   if (!gMediaDecoderLog) {
     gMediaDecoderLog = PR_NewLogModule("MediaDecoder");
   }
 
--- a/dom/media/omx/MediaOmxReader.cpp
+++ b/dom/media/omx/MediaOmxReader.cpp
@@ -23,17 +23,17 @@
 #define MAX_VIDEO_DECODE_SECONDS 0.1
 
 using namespace mozilla::gfx;
 using namespace android;
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gMediaDecoderLog;
-#define DECODER_LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
+#define DECODER_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
 
 class MediaOmxReader::ProcessCachedDataTask : public Task
 {
 public:
   ProcessCachedDataTask(MediaOmxReader* aOmxReader, int64_t aOffset)
   : mOmxReader(aOmxReader),
     mOffset(aOffset)
   { }
--- a/dom/media/omx/OmxDecoder.cpp
+++ b/dom/media/omx/OmxDecoder.cpp
@@ -33,17 +33,17 @@
 #include "OMXCodecProxy.h"
 #include "OmxDecoder.h"
 
 #include <android/log.h>
 #define OD_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "OmxDecoder", __VA_ARGS__)
 
 #undef LOG
 PRLogModuleInfo *gOmxDecoderLog;
-#define LOG(type, msg...) PR_LOG(gOmxDecoderLog, type, (msg))
+#define LOG(type, msg...) MOZ_LOG(gOmxDecoderLog, type, (msg))
 
 using namespace MPAPI;
 using namespace mozilla;
 using namespace mozilla::gfx;
 using namespace mozilla::layers;
 using namespace android;
 
 OmxDecoder::OmxDecoder(MediaResource *aResource,
--- a/dom/media/platforms/apple/AppleATDecoder.cpp
+++ b/dom/media/platforms/apple/AppleATDecoder.cpp
@@ -8,17 +8,17 @@
 #include "MP4Reader.h"
 #include "MP4Decoder.h"
 #include "mp4_demuxer/Adts.h"
 #include "MediaInfo.h"
 #include "AppleATDecoder.h"
 #include "mozilla/Logging.h"
 
 PRLogModuleInfo* GetAppleMediaLog();
-#define LOG(...) PR_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 #define FourCC2Str(n) ((char[5]){(char)(n >> 24), (char)(n >> 16), (char)(n >> 8), (char)(n), 0})
 
 namespace mozilla {
 
 AppleATDecoder::AppleATDecoder(const AudioInfo& aConfig,
                                FlushableMediaTaskQueue* aAudioTaskQueue,
                                MediaDataDecoderCallback* aCallback)
   : mConfig(aConfig)
--- a/dom/media/platforms/apple/AppleCMLinker.cpp
+++ b/dom/media/platforms/apple/AppleCMLinker.cpp
@@ -8,17 +8,17 @@
 
 #include "AppleCMLinker.h"
 #include "MainThreadUtils.h"
 #include "mozilla/ArrayUtils.h"
 #include "nsCocoaFeatures.h"
 #include "nsDebug.h"
 
 PRLogModuleInfo* GetAppleMediaLog();
-#define LOG(...) PR_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 namespace mozilla {
 
 AppleCMLinker::LinkStatus
 AppleCMLinker::sLinkStatus = LinkStatus_INIT;
 
 void* AppleCMLinker::sLink = nullptr;
 nsrefcnt AppleCMLinker::sRefCount = 0;
--- a/dom/media/platforms/apple/AppleVDADecoder.cpp
+++ b/dom/media/platforms/apple/AppleVDADecoder.cpp
@@ -19,17 +19,17 @@
 #include "nsCocoaFeatures.h"
 #include "nsThreadUtils.h"
 #include "mozilla/Logging.h"
 #include "VideoUtils.h"
 #include <algorithm>
 #include "gfxPlatform.h"
 
 PRLogModuleInfo* GetAppleMediaLog();
-#define LOG(...) PR_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 //#define LOG_MEDIA_SHA1
 
 namespace mozilla {
 
 AppleVDADecoder::AppleVDADecoder(const VideoInfo& aConfig,
                                FlushableMediaTaskQueue* aVideoTaskQueue,
                                MediaDataDecoderCallback* aCallback,
                                layers::ImageContainer* aImageContainer)
--- a/dom/media/platforms/apple/AppleVDALinker.cpp
+++ b/dom/media/platforms/apple/AppleVDALinker.cpp
@@ -6,17 +6,17 @@
 
 #include <dlfcn.h>
 
 #include "AppleVDALinker.h"
 #include "MainThreadUtils.h"
 #include "nsDebug.h"
 
 PRLogModuleInfo* GetAppleMediaLog();
-#define LOG(...) PR_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 namespace mozilla {
 
 AppleVDALinker::LinkStatus
 AppleVDALinker::sLinkStatus = LinkStatus_INIT;
 
 void* AppleVDALinker::sLink = nullptr;
 nsrefcnt AppleVDALinker::sRefCount = 0;
--- a/dom/media/platforms/apple/AppleVTDecoder.cpp
+++ b/dom/media/platforms/apple/AppleVTDecoder.cpp
@@ -16,17 +16,17 @@
 #include "mozilla/ArrayUtils.h"
 #include "nsAutoPtr.h"
 #include "nsThreadUtils.h"
 #include "mozilla/Logging.h"
 #include "VideoUtils.h"
 #include "gfxPlatform.h"
 
 PRLogModuleInfo* GetAppleMediaLog();
-#define LOG(...) PR_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 //#define LOG_MEDIA_SHA1
 
 #ifdef LOG_MEDIA_SHA1
 #include "mozilla/SHA1.h"
 #endif
 
 namespace mozilla {
 
--- a/dom/media/platforms/apple/AppleVTLinker.cpp
+++ b/dom/media/platforms/apple/AppleVTLinker.cpp
@@ -7,17 +7,17 @@
 #include <dlfcn.h>
 
 #include "AppleVTLinker.h"
 #include "MainThreadUtils.h"
 #include "mozilla/ArrayUtils.h"
 #include "nsDebug.h"
 
 PRLogModuleInfo* GetAppleMediaLog();
-#define LOG(...) PR_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 namespace mozilla {
 
 AppleVTLinker::LinkStatus
 AppleVTLinker::sLinkStatus = LinkStatus_INIT;
 
 void* AppleVTLinker::sLink = nullptr;
 nsrefcnt AppleVTLinker::sRefCount = 0;
--- a/dom/media/platforms/ffmpeg/FFmpegLog.h
+++ b/dom/media/platforms/ffmpeg/FFmpegLog.h
@@ -3,11 +3,11 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef __FFmpegLog_h__
 #define __FFmpegLog_h__
 
 extern PRLogModuleInfo* GetFFmpegDecoderLog();
-#define FFMPEG_LOG(...) PR_LOG(GetFFmpegDecoderLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define FFMPEG_LOG(...) MOZ_LOG(GetFFmpegDecoderLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 #endif // __FFmpegLog_h__
--- a/dom/media/platforms/gonk/GonkAudioDecoderManager.cpp
+++ b/dom/media/platforms/gonk/GonkAudioDecoderManager.cpp
@@ -21,17 +21,17 @@
 #include "media/openmax/OMX_Audio.h"
 #include "MediaData.h"
 #include "MediaInfo.h"
 
 #include <android/log.h>
 #define GADM_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "GonkAudioDecoderManager", __VA_ARGS__)
 
 PRLogModuleInfo* GetDemuxerLog();
-#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 #define READ_OUTPUT_BUFFER_TIMEOUT_US  3000
 
 using namespace android;
 typedef android::MediaCodecProxy MediaCodecProxy;
 
 namespace mozilla {
 
 GonkAudioDecoderManager::GonkAudioDecoderManager(const AudioInfo& aConfig)
--- a/dom/media/platforms/gonk/GonkMediaDataDecoder.cpp
+++ b/dom/media/platforms/gonk/GonkMediaDataDecoder.cpp
@@ -9,17 +9,17 @@
 #include "MediaCodecProxy.h"
 #include "MediaData.h"
 
 #include "mozilla/Logging.h"
 #include <android/log.h>
 #define GMDD_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "GonkMediaDataDecoder", __VA_ARGS__)
 
 PRLogModuleInfo* GetDemuxerLog();
-#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 using namespace android;
 
 namespace mozilla {
 
 GonkMediaDataDecoder::GonkMediaDataDecoder(GonkDecoderManager* aManager,
                                            FlushableMediaTaskQueue* aTaskQueue,
                                            MediaDataDecoderCallback* aCallback)
--- a/dom/media/platforms/gonk/GonkVideoDecoderManager.cpp
+++ b/dom/media/platforms/gonk/GonkVideoDecoderManager.cpp
@@ -27,17 +27,17 @@
 #include "mozilla/layers/TextureClient.h"
 
 #define READ_OUTPUT_BUFFER_TIMEOUT_US  3000
 
 #include <android/log.h>
 #define GVDM_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "GonkVideoDecoderManager", __VA_ARGS__)
 
 PRLogModuleInfo* GetDemuxerLog();
-#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 using namespace mozilla::layers;
 using namespace android;
 typedef android::MediaCodecProxy MediaCodecProxy;
 
 namespace mozilla {
 
 GonkVideoDecoderManager::GonkVideoDecoderManager(
   mozilla::layers::ImageContainer* aImageContainer,
--- a/dom/media/platforms/wmf/MFTDecoder.cpp
+++ b/dom/media/platforms/wmf/MFTDecoder.cpp
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "MFTDecoder.h"
 #include "nsThreadUtils.h"
 #include "WMFUtils.h"
 #include "mozilla/Logging.h"
 
 PRLogModuleInfo* GetDemuxerLog();
-#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 namespace mozilla {
 
 MFTDecoder::MFTDecoder()
   : mMFTProvidesOutputSamples(false)
   , mDiscontinuity(true)
 {
   memset(&mInputStreamInfo, 0, sizeof(MFT_INPUT_STREAM_INFO));
--- a/dom/media/platforms/wmf/WMFAudioMFTManager.cpp
+++ b/dom/media/platforms/wmf/WMFAudioMFTManager.cpp
@@ -8,17 +8,17 @@
 #include "MediaInfo.h"
 #include "VideoUtils.h"
 #include "WMFUtils.h"
 #include "nsTArray.h"
 
 #include "mozilla/Logging.h"
 
 PRLogModuleInfo* GetDemuxerLog();
-#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 namespace mozilla {
 
 static void
 AACAudioSpecificConfigToUserData(uint8_t aAACProfileLevelIndication,
                                  const uint8_t* aAudioSpecConfig,
                                  uint32_t aConfigLength,
                                  nsTArray<BYTE>& aOutUserData)
--- a/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
+++ b/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
@@ -8,17 +8,17 @@
 #include "VideoUtils.h"
 #include "WMFUtils.h"
 #include "nsTArray.h"
 #include "mozilla/Telemetry.h"
 
 #include "mozilla/Logging.h"
 
 PRLogModuleInfo* GetDemuxerLog();
-#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 namespace mozilla {
 
 WMFMediaDataDecoder::WMFMediaDataDecoder(MFTManager* aMFTManager,
                                          FlushableMediaTaskQueue* aTaskQueue,
                                          MediaDataDecoderCallback* aCallback)
   : mTaskQueue(aTaskQueue)
   , mCallback(aCallback)
--- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
+++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
@@ -17,17 +17,17 @@
 #include "MediaInfo.h"
 #include "mozilla/Logging.h"
 #include "gfx2DGlue.h"
 #include "gfxWindowsPlatform.h"
 #include "IMFYCbCrImage.h"
 #include "mozilla/WindowsVersion.h"
 
 PRLogModuleInfo* GetDemuxerLog();
-#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 using mozilla::layers::Image;
 using mozilla::layers::IMFYCbCrImage;
 using mozilla::layers::LayerManager;
 using mozilla::layers::LayersBackend;
 
 const GUID MFVideoFormat_VP80 =
 {
--- a/dom/media/systemservices/LoadManager.cpp
+++ b/dom/media/systemservices/LoadManager.cpp
@@ -16,17 +16,17 @@
 #include "nsReadableUtils.h"
 #include "nsNetUtil.h"
 #include "nsIObserverService.h"
 
 // NSPR_LOG_MODULES=LoadManager:5
 PRLogModuleInfo *gLoadManagerLog = nullptr;
 #undef LOG
 #undef LOG_ENABLED
-#define LOG(args) PR_LOG(gLoadManagerLog, PR_LOG_DEBUG, args)
+#define LOG(args) MOZ_LOG(gLoadManagerLog, PR_LOG_DEBUG, args)
 #define LOG_ENABLED() PR_LOG_TEST(gLoadManagerLog, 5)
 
 namespace mozilla {
 
 /* static */ StaticRefPtr<LoadManagerSingleton> LoadManagerSingleton::sSingleton;
 
 NS_IMPL_ISUPPORTS(LoadManagerSingleton, nsIObserver)
 
--- a/dom/media/systemservices/LoadMonitor.cpp
+++ b/dom/media/systemservices/LoadMonitor.cpp
@@ -51,17 +51,17 @@
 #include <pdh.h>
 #include <tchar.h>
 #pragma comment(lib, "pdh.lib")
 #endif
 
 // NSPR_LOG_MODULES=LoadManager:5
 #undef LOG
 #undef LOG_ENABLED
-#define LOG(args) PR_LOG(gLoadManagerLog, PR_LOG_DEBUG, args)
+#define LOG(args) MOZ_LOG(gLoadManagerLog, PR_LOG_DEBUG, args)
 #define LOG_ENABLED() PR_LOG_TEST(gLoadManagerLog, 4)
 #define LOG_MANY_ENABLED() PR_LOG_TEST(gLoadManagerLog, 5)
 
 namespace mozilla {
 
 NS_IMPL_ISUPPORTS(LoadMonitor, nsIObserver)
 
 LoadMonitor::LoadMonitor(int aLoadUpdateInterval)
--- a/dom/media/systemservices/MediaChild.cpp
+++ b/dom/media/systemservices/MediaChild.cpp
@@ -10,17 +10,17 @@
 #include "mozilla/ipc/PBackgroundChild.h"
 #include "nsGlobalWindow.h"
 #include "mozilla/MediaManager.h"
 #include "mozilla/Logging.h"
 #include "nsQueryObject.h"
 
 #undef LOG
 PRLogModuleInfo *gMediaChildLog;
-#define LOG(args) PR_LOG(gMediaChildLog, PR_LOG_DEBUG, args)
+#define LOG(args) MOZ_LOG(gMediaChildLog, PR_LOG_DEBUG, args)
 
 namespace mozilla {
 namespace media {
 
 static Child* sChild;
 
 template<typename ValueType> void
 ChildPledge<ValueType>::ActorCreated(PBackgroundChild* aActor)
--- a/dom/media/systemservices/MediaParent.cpp
+++ b/dom/media/systemservices/MediaParent.cpp
@@ -16,17 +16,17 @@
 #include "nsNetUtil.h"
 #include "nsILineInputStream.h"
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsISupportsImpl.h"
 #include "mozilla/Logging.h"
 
 #undef LOG
 PRLogModuleInfo *gMediaParentLog;
-#define LOG(args) PR_LOG(gMediaParentLog, PR_LOG_DEBUG, args)
+#define LOG(args) MOZ_LOG(gMediaParentLog, PR_LOG_DEBUG, args)
 
 // A file in the profile dir is used to persist mOriginKeys used to anonymize
 // deviceIds to be unique per origin, to avoid them being supercookies.
 
 #define ORIGINKEYS_FILE "enumerate_devices.txt"
 #define ORIGINKEYS_VERSION "1"
 
 namespace mozilla {
--- a/dom/media/systemservices/OpenSLESProvider.cpp
+++ b/dom/media/systemservices/OpenSLESProvider.cpp
@@ -10,17 +10,17 @@
 #include <dlfcn.h>
 #include <SLES/OpenSLES_Android.h>
 #include <SLES/OpenSLES_AndroidConfiguration.h>
 
 // NSPR_LOG_MODULES=OpenSLESProvider:5
 #undef LOG
 #undef LOG_ENABLED
 PRLogModuleInfo *gOpenSLESProviderLog;
-#define LOG(args) PR_LOG(gOpenSLESProviderLog, PR_LOG_DEBUG, args)
+#define LOG(args) MOZ_LOG(gOpenSLESProviderLog, PR_LOG_DEBUG, args)
 #define LOG_ENABLED() PR_LOG_TEST(gOpenSLESProviderLog, PR_LOG_DEBUG)
 
 namespace mozilla {
 
 OpenSLESProvider::OpenSLESProvider()
   : mLock("OpenSLESProvider.mLock"),
     mSLEngine(nullptr),
     mSLEngineUsers(0),
--- a/dom/media/wave/WaveReader.cpp
+++ b/dom/media/wave/WaveReader.cpp
@@ -18,19 +18,19 @@
 #include <algorithm>
 
 namespace mozilla {
 
 // Un-comment to enable logging of seek bisections.
 //#define SEEK_LOGGING
 
 extern PRLogModuleInfo* gMediaDecoderLog;
-#define LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
+#define LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
 #ifdef SEEK_LOGGING
-#define SEEK_LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
+#define SEEK_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
 #else
 #define SEEK_LOG(type, msg)
 #endif
 
 struct waveIdToName {
   uint32_t id;
   nsCString name;
 };
--- a/dom/media/webm/IntelWebMVideoDecoder.cpp
+++ b/dom/media/webm/IntelWebMVideoDecoder.cpp
@@ -16,17 +16,17 @@
 #include "nestegg/nestegg.h"
 
 #define VPX_DONT_DEFINE_STDINT_TYPES
 #include "vpx/vp8dx.h"
 #include "vpx/vpx_decoder.h"
 
 #undef LOG
 PRLogModuleInfo* GetDemuxerLog();
-#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 using namespace mp4_demuxer;
 
 namespace mozilla {
 
 using layers::Image;
 using layers::LayerManager;
 using layers::LayersBackend;
--- a/dom/media/webm/WebMReader.cpp
+++ b/dom/media/webm/WebMReader.cpp
@@ -30,19 +30,19 @@
 #endif
 
 // Un-comment to enable logging of seek bisections.
 //#define SEEK_LOGGING
 
 #undef LOG
 
 #include "prprf.h"
-#define LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
+#define LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
 #ifdef SEEK_LOGGING
-#define SEEK_LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
+#define SEEK_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
 #else
 #define SEEK_LOG(type, msg)
 #endif
 
 namespace mozilla {
 
 using namespace gfx;
 using namespace layers;
@@ -132,17 +132,17 @@ static void webm_log(nestegg * context,
       sevStr = "UNK";
       break;
   }
 
   va_start(args, format);
 
   PR_snprintf(msg, sizeof(msg), "%p [Nestegg-%s] ", context, sevStr);
   PR_vsnprintf(msg+strlen(msg), sizeof(msg)-strlen(msg), format, args);
-  PR_LOG(gNesteggLog, PR_LOG_DEBUG, (msg));
+  MOZ_LOG(gNesteggLog, PR_LOG_DEBUG, (msg));
 
   va_end(args);
 }
 
 ogg_packet InitOggPacket(const unsigned char* aData, size_t aLength,
                          bool aBOS, bool aEOS,
                          int64_t aGranulepos, int64_t aPacketNo)
 {
--- a/dom/media/webrtc/MediaEngineCameraVideoSource.cpp
+++ b/dom/media/webrtc/MediaEngineCameraVideoSource.cpp
@@ -11,18 +11,18 @@ namespace mozilla {
 using namespace mozilla::gfx;
 using dom::OwningLongOrConstrainLongRange;
 using dom::ConstrainLongRange;
 using dom::OwningDoubleOrConstrainDoubleRange;
 using dom::ConstrainDoubleRange;
 using dom::MediaTrackConstraintSet;
 
 extern PRLogModuleInfo* GetMediaManagerLog();
-#define LOG(msg) PR_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
-#define LOGFRAME(msg) PR_LOG(GetMediaManagerLog(), 6, msg)
+#define LOG(msg) MOZ_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
+#define LOGFRAME(msg) MOZ_LOG(GetMediaManagerLog(), 6, msg)
 
 // guts for appending data to the MSG track
 bool MediaEngineCameraVideoSource::AppendToTrack(SourceMediaStream* aSource,
                                                  layers::Image* aImage,
                                                  TrackID aID,
                                                  StreamTime delta)
 {
   MOZ_ASSERT(aSource);
--- a/dom/media/webrtc/MediaEngineGonkVideoSource.cpp
+++ b/dom/media/webrtc/MediaEngineGonkVideoSource.cpp
@@ -21,18 +21,18 @@
 namespace mozilla {
 
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
 using namespace android;
 
 #undef LOG
 extern PRLogModuleInfo* GetMediaManagerLog();
-#define LOG(msg) PR_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
-#define LOGFRAME(msg) PR_LOG(GetMediaManagerLog(), 6, msg)
+#define LOG(msg) MOZ_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
+#define LOGFRAME(msg) MOZ_LOG(GetMediaManagerLog(), 6, msg)
 
 class MediaBufferListener : public GonkCameraSource::DirectBufferListener {
 public:
   MediaBufferListener(MediaEngineGonkVideoSource* aMediaEngine)
     : mMediaEngine(aMediaEngine)
   {
   }
 
--- a/dom/media/webrtc/MediaEngineWebRTC.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTC.cpp
@@ -30,17 +30,17 @@ GetUserMediaLog()
 #endif
 
 #if defined(MOZ_B2G_CAMERA) && defined(MOZ_WIDGET_GONK)
 #include "ICameraControl.h"
 #include "MediaEngineGonkVideoSource.h"
 #endif
 
 #undef LOG
-#define LOG(args) PR_LOG(GetUserMediaLog(), PR_LOG_DEBUG, args)
+#define LOG(args) MOZ_LOG(GetUserMediaLog(), PR_LOG_DEBUG, args)
 
 namespace mozilla {
 
 MediaEngineWebRTC::MediaEngineWebRTC(MediaEnginePrefs &aPrefs)
     : mMutex("mozilla::MediaEngineWebRTC")
     , mScreenEngine(nullptr)
     , mBrowserEngine(nullptr)
     , mWinEngine(nullptr)
--- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
@@ -32,18 +32,18 @@ static_assert(!(MAX_AEC_FIFO_DEPTH % 10)
 
 namespace mozilla {
 
 #ifdef LOG
 #undef LOG
 #endif
 
 extern PRLogModuleInfo* GetMediaManagerLog();
-#define LOG(msg) PR_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
-#define LOG_FRAMES(msg) PR_LOG(GetMediaManagerLog(), 6, msg)
+#define LOG(msg) MOZ_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
+#define LOG_FRAMES(msg) MOZ_LOG(GetMediaManagerLog(), 6, msg)
 
 /**
  * Webrtc audio source.
  */
 NS_IMPL_ISUPPORTS0(MediaEngineWebRTCAudioSource)
 
 // XXX temp until MSG supports registration
 StaticRefPtr<AudioOutputObserver> gFarendObserver;
--- a/dom/media/webrtc/MediaEngineWebRTCVideo.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTCVideo.cpp
@@ -14,18 +14,18 @@
 namespace mozilla {
 
 using namespace mozilla::gfx;
 using dom::ConstrainLongRange;
 using dom::ConstrainDoubleRange;
 using dom::MediaTrackConstraintSet;
 
 extern PRLogModuleInfo* GetMediaManagerLog();
-#define LOG(msg) PR_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
-#define LOGFRAME(msg) PR_LOG(GetMediaManagerLog(), 6, msg)
+#define LOG(msg) MOZ_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
+#define LOGFRAME(msg) MOZ_LOG(GetMediaManagerLog(), 6, msg)
 
 /**
  * Webrtc video source.
  */
 
 NS_IMPL_ISUPPORTS0(MediaEngineWebRTCVideoSource)
 
 int
--- a/dom/media/webspeech/recognition/SpeechRecognition.cpp
+++ b/dom/media/webspeech/recognition/SpeechRecognition.cpp
@@ -53,17 +53,17 @@ GetSpeechRecognitionLog()
 {
   static PRLogModuleInfo* sLog;
   if (!sLog) {
     sLog = PR_NewLogModule("SpeechRecognition");
   }
 
   return sLog;
 }
-#define SR_LOG(...) PR_LOG(GetSpeechRecognitionLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define SR_LOG(...) MOZ_LOG(GetSpeechRecognitionLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 already_AddRefed<nsISpeechRecognitionService>
 GetSpeechRecognitionService()
 {
   nsAutoCString speechRecognitionServiceCID;
 
   nsAdoptingCString prefValue =
   Preferences::GetCString(PREFERENCE_DEFAULT_RECOGNITION_SERVICE);
--- a/dom/media/webspeech/recognition/SpeechRecognition.h
+++ b/dom/media/webspeech/recognition/SpeechRecognition.h
@@ -40,17 +40,17 @@ namespace dom {
 #define TEST_PREFERENCE_FAKE_RECOGNITION_SERVICE "media.webspeech.test.fake_recognition_service"
 #define SPEECH_RECOGNITION_TEST_EVENT_REQUEST_TOPIC "SpeechRecognitionTest:RequestEvent"
 #define SPEECH_RECOGNITION_TEST_END_TOPIC "SpeechRecognitionTest:End"
 
 class GlobalObject;
 class SpeechEvent;
 
 PRLogModuleInfo* GetSpeechRecognitionLog();
-#define SR_LOG(...) PR_LOG(GetSpeechRecognitionLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+#define SR_LOG(...) MOZ_LOG(GetSpeechRecognitionLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 
 already_AddRefed<nsISpeechRecognitionService> GetSpeechRecognitionService();
 
 class SpeechRecognition final : public DOMEventTargetHelper,
                                 public nsIObserver,
                                 public SupportsWeakPtr<SpeechRecognition>
 {
 public:
--- a/dom/media/webspeech/synth/SpeechSynthesis.cpp
+++ b/dom/media/webspeech/synth/SpeechSynthesis.cpp
@@ -22,17 +22,17 @@ GetSpeechSynthLog()
   static PRLogModuleInfo* sLog = nullptr;
 
   if (!sLog) {
     sLog = PR_NewLogModule("SpeechSynthesis");
   }
 
   return sLog;
 }
-#define LOG(type, msg) PR_LOG(GetSpeechSynthLog(), type, msg)
+#define LOG(type, msg) MOZ_LOG(GetSpeechSynthLog(), type, msg)
 
 namespace mozilla {
 namespace dom {
 
 static PLDHashOperator
 TraverseCachedVoices(const nsAString& aKey, SpeechSynthesisVoice* aEntry, void* aData)
 {
   nsCycleCollectionTraversalCallback* cb = static_cast<nsCycleCollectionTraversalCallback*>(aData);
--- a/dom/media/webspeech/synth/nsSpeechTask.cpp
+++ b/dom/media/webspeech/synth/nsSpeechTask.cpp
@@ -11,17 +11,17 @@
 // GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
 // GetTickCount() and conflicts with nsSpeechTask::GetCurrentTime().
 #ifdef GetCurrentTime
 #undef GetCurrentTime
 #endif
 
 #undef LOG
 extern PRLogModuleInfo* GetSpeechSynthLog();
-#define LOG(type, msg) PR_LOG(GetSpeechSynthLog(), type, msg)
+#define LOG(type, msg) MOZ_LOG(GetSpeechSynthLog(), type, msg)
 
 namespace mozilla {
 namespace dom {
 
 class SynthStreamListener : public MediaStreamListener
 {
 public:
   explicit SynthStreamListener(nsSpeechTask* aSpeechTask) :
--- a/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
+++ b/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
@@ -19,17 +19,17 @@
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/unused.h"
 
 #include "SpeechSynthesisChild.h"
 #include "SpeechSynthesisParent.h"
 
 #undef LOG
 extern PRLogModuleInfo* GetSpeechSynthLog();
-#define LOG(type, msg) PR_LOG(GetSpeechSynthLog(), type, msg)
+#define LOG(type, msg) MOZ_LOG(GetSpeechSynthLog(), type, msg)
 
 namespace {
 
 void
 GetAllSpeechSynthActors(InfallibleTArray<mozilla::dom::SpeechSynthesisParent*>& aActors)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aActors.IsEmpty());
--- a/dom/media/wmf/WMFByteStream.cpp
+++ b/dom/media/wmf/WMFByteStream.cpp
@@ -21,17 +21,17 @@
 #include "mozilla/DebugOnly.h"
 #include "SharedThreadPool.h"
 #include <algorithm>
 #include <cassert>
 
 namespace mozilla {
 
 PRLogModuleInfo* gWMFByteStreamLog = nullptr;
-#define WMF_BS_LOG(...) PR_LOG(gWMFByteStreamLog, PR_LOG_DEBUG, (__VA_ARGS__))
+#define WMF_BS_LOG(...) MOZ_LOG(gWMFByteStreamLog, PR_LOG_DEBUG, (__VA_ARGS__))
 
 WMFByteStream::WMFByteStream(MediaResource* aResource,
                              WMFSourceReaderCallback* aSourceReaderCallback)
   : mSourceReaderCallback(aSourceReaderCallback),
     mResource(aResource),
     mReentrantMonitor("WMFByteStream.Data"),
     mOffset(0),
     mIsShutdown(false)
--- a/dom/media/wmf/WMFReader.cpp
+++ b/dom/media/wmf/WMFReader.cpp
@@ -29,17 +29,17 @@
 using namespace mozilla::gfx;
 using mozilla::layers::Image;
 using mozilla::layers::LayerManager;
 using mozilla::layers::LayersBackend;
 
 namespace mozilla {
 
 extern PRLogModuleInfo* gMediaDecoderLog;
-#define DECODER_LOG(...) PR_LOG(gMediaDecoderLog, PR_LOG_DEBUG, (__VA_ARGS__))
+#define DECODER_LOG(...) MOZ_LOG(gMediaDecoderLog, PR_LOG_DEBUG, (__VA_ARGS__))
 
 // Uncomment to enable verbose per-sample logging.
 //#define LOG_SAMPLE_DECODE 1
 
 WMFReader::WMFReader(AbstractMediaDecoder* aDecoder)
   : MediaDecoderReader(aDecoder),
     mSourceReader(nullptr),
     mAudioChannels(0),
--- a/dom/media/wmf/WMFSourceReaderCallback.cpp
+++ b/dom/media/wmf/WMFSourceReaderCallback.cpp
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WMFSourceReaderCallback.h"
 #include "WMFUtils.h"
 
 namespace mozilla {
 
 static PRLogModuleInfo* gWMFSourceReaderCallbackLog = nullptr;
-#define WMF_CB_LOG(...) PR_LOG(gWMFSourceReaderCallbackLog, PR_LOG_DEBUG, (__VA_ARGS__))
+#define WMF_CB_LOG(...) MOZ_LOG(gWMFSourceReaderCallbackLog, PR_LOG_DEBUG, (__VA_ARGS__))
 
 // IUnknown Methods
 STDMETHODIMP
 WMFSourceReaderCallback::QueryInterface(REFIID aIId, void **aInterface)
 {
   WMF_CB_LOG("WMFSourceReaderCallback::QueryInterface %s", GetGUIDName(aIId).get());
 
   if (aIId == IID_IMFSourceReaderCallback) {
--- a/dom/plugins/base/nsNPAPIPlugin.cpp
+++ b/dom/plugins/base/nsNPAPIPlugin.cpp
@@ -2463,20 +2463,20 @@ NPError
     NPN_PLUGIN_LOG(PLUGIN_LOG_ALWAYS,("NPN_requestread called from the wrong thread\n"));
     return NPERR_INVALID_PARAM;
   }
   NPN_PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("NPN_RequestRead: stream=%p\n",
                                      (void*)pstream));
 
 #ifdef PLUGIN_LOGGING
   for(NPByteRange * range = rangeList; range != nullptr; range = range->next)
-    PR_LOG(nsPluginLogging::gNPNLog,PLUGIN_LOG_NOISY,
+    MOZ_LOG(nsPluginLogging::gNPNLog,PLUGIN_LOG_NOISY,
     ("%i-%i", range->offset, range->offset + range->length - 1));
 
-  PR_LOG(nsPluginLogging::gNPNLog,PLUGIN_LOG_NOISY, ("\n\n"));
+  MOZ_LOG(nsPluginLogging::gNPNLog,PLUGIN_LOG_NOISY, ("\n\n"));
   PR_LogFlush();
 #endif
 
   if (!pstream || !rangeList || !pstream->ndata)
     return NPERR_INVALID_PARAM;
 
   nsNPAPIStreamWrapper* streamWrapper = static_cast<nsNPAPIStreamWrapper*>(pstream->ndata);
   nsNPAPIPluginStreamListener* streamlistener = streamWrapper->GetStreamListener();
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -279,19 +279,19 @@ nsPluginHost::nsPluginHost()
 #endif
   }
 
 #ifdef PLUGIN_LOGGING
   nsPluginLogging::gNPNLog = PR_NewLogModule(NPN_LOG_NAME);
   nsPluginLogging::gNPPLog = PR_NewLogModule(NPP_LOG_NAME);
   nsPluginLogging::gPluginLog = PR_NewLogModule(PLUGIN_LOG_NAME);
 
-  PR_LOG(nsPluginLogging::gNPNLog, PLUGIN_LOG_ALWAYS,("NPN Logging Active!\n"));
-  PR_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_ALWAYS,("General Plugin Logging Active! (nsPluginHost::ctor)\n"));
-  PR_LOG(nsPluginLogging::gNPPLog, PLUGIN_LOG_ALWAYS,("NPP Logging Active!\n"));
+  MOZ_LOG(nsPluginLogging::gNPNLog, PLUGIN_LOG_ALWAYS,("NPN Logging Active!\n"));
+  MOZ_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_ALWAYS,("General Plugin Logging Active! (nsPluginHost::ctor)\n"));
+  MOZ_LOG(nsPluginLogging::gNPPLog, PLUGIN_LOG_ALWAYS,("NPP Logging Active!\n"));
 
   PLUGIN_LOG(PLUGIN_LOG_ALWAYS,("nsPluginHost::ctor\n"));
   PR_LogFlush();
 #endif
 }
 
 nsPluginHost::~nsPluginHost()
 {
@@ -784,17 +784,17 @@ nsPluginHost::InstantiatePluginInstance(
 {
   NS_ENSURE_ARG_POINTER(aOwner);
 
 #ifdef PLUGIN_LOGGING
   nsAutoCString urlSpec;
   if (aURL)
     aURL->GetAsciiSpec(urlSpec);
 
-  PR_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_NORMAL,
+  MOZ_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_NORMAL,
         ("nsPluginHost::InstantiatePlugin Begin mime=%s, url=%s\n",
          PromiseFlatCString(aMimeType).get(), urlSpec.get()));
 
   PR_LogFlush();
 #endif
 
   if (aMimeType.IsEmpty()) {
     NS_NOTREACHED("Attempting to spawn a plugin with no mime type");
@@ -847,17 +847,17 @@ nsPluginHost::InstantiatePluginInstance(
 
   // At this point we consider instantiation to be successful. Do not return an error.
   instanceOwner.forget(aOwner);
 
 #ifdef PLUGIN_LOGGING
   nsAutoCString urlSpec2;
   if (aURL != nullptr) aURL->GetAsciiSpec(urlSpec2);
 
-  PR_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_NORMAL,
+  MOZ_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_NORMAL,
         ("nsPluginHost::InstantiatePlugin Finished mime=%s, rv=%d, url=%s\n",
          PromiseFlatCString(aMimeType).get(), rv, urlSpec2.get()));
 
   PR_LogFlush();
 #endif
 
   return NS_OK;
 }
@@ -925,17 +925,17 @@ nsresult
 nsPluginHost::TrySetUpPluginInstance(const nsACString &aMimeType,
                                      nsIURI *aURL,
                                      nsPluginInstanceOwner *aOwner)
 {
 #ifdef PLUGIN_LOGGING
   nsAutoCString urlSpec;
   if (aURL != nullptr) aURL->GetSpec(urlSpec);
 
-  PR_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_NORMAL,
+  MOZ_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_NORMAL,
         ("nsPluginHost::TrySetupPluginInstance Begin mime=%s, owner=%p, url=%s\n",
          PromiseFlatCString(aMimeType).get(), aOwner, urlSpec.get()));
 
   PR_LogFlush();
 #endif
 
 #ifdef XP_WIN
   bool changed;
@@ -988,17 +988,17 @@ nsPluginHost::TrySetUpPluginInstance(con
     pluginTag->mUnloadTimer->Cancel();
   }
 
 #ifdef PLUGIN_LOGGING
   nsAutoCString urlSpec2;
   if (aURL)
     aURL->GetSpec(urlSpec2);
 
-  PR_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_BASIC,
+  MOZ_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_BASIC,
         ("nsPluginHost::TrySetupPluginInstance Finished mime=%s, rv=%d, owner=%p, url=%s\n",
          PromiseFlatCString(aMimeType).get(), rv, aOwner, urlSpec2.get()));
 
   PR_LogFlush();
 #endif
 
   return rv;
 }
@@ -2962,17 +2962,17 @@ nsPluginHost::ReadPluginInfo()
     if (heapalloced)
       delete [] heapalloced;
 
     // Import flags from registry into prefs for old registry versions
     if (hasValidFlags && !pluginStateImported) {
       tag->ImportFlagsToPrefs(tagflag);
     }
 
-    PR_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_BASIC,
+    MOZ_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_BASIC,
       ("LoadCachedPluginsInfo : Loading Cached plugininfo for %s\n", tag->mFileName.get()));
     tag->mNext = mCachedPlugins;
     mCachedPlugins = tag;
   }
 
 // On Android we always want to try to load a plugin again (Flash). Bug 935676.
 #ifndef MOZ_WIDGET_ANDROID
   if (hasInvalidPlugins) {
--- a/dom/plugins/base/nsPluginLogging.h
+++ b/dom/plugins/base/nsPluginLogging.h
@@ -55,37 +55,37 @@ public:
 };
 
 #endif   // PLUGIN_LOGGING
 
 // Quick-use macros
 #ifdef PLUGIN_LOGGING
  #define NPN_PLUGIN_LOG(a, b)                              \
    PR_BEGIN_MACRO                                        \
-   PR_LOG(nsPluginLogging::gNPNLog, a, b); \
+   MOZ_LOG(nsPluginLogging::gNPNLog, a, b); \
    PR_LogFlush();                                                    \
    PR_END_MACRO
 #else
  #define NPN_PLUGIN_LOG(a, b)
 #endif
 
 #ifdef PLUGIN_LOGGING
  #define NPP_PLUGIN_LOG(a, b)                              \
    PR_BEGIN_MACRO                                         \
-   PR_LOG(nsPluginLogging::gNPPLog, a, b); \
+   MOZ_LOG(nsPluginLogging::gNPPLog, a, b); \
    PR_LogFlush();                                                    \
    PR_END_MACRO
 #else
  #define NPP_PLUGIN_LOG(a, b)
 #endif
 
 #ifdef PLUGIN_LOGGING
  #define PLUGIN_LOG(a, b)                              \
    PR_BEGIN_MACRO                                         \
-   PR_LOG(nsPluginLogging::gPluginLog, a, b); \
+   MOZ_LOG(nsPluginLogging::gPluginLog, a, b); \
    PR_LogFlush();                                                    \
    PR_END_MACRO
 #else
  #define PLUGIN_LOG(a, b)
 #endif
 
 #endif   // nsPluginLogging_h__
 
--- a/dom/plugins/base/nsPluginStreamListenerPeer.cpp
+++ b/dom/plugins/base/nsPluginStreamListenerPeer.cpp
@@ -275,17 +275,17 @@ nsPluginStreamListenerPeer::nsPluginStre
   mModified = 0;
   mStreamOffset = 0;
   mStreamComplete = 0;
 }
 
 nsPluginStreamListenerPeer::~nsPluginStreamListenerPeer()
 {
 #ifdef PLUGIN_LOGGING
-  PR_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_NORMAL,
+  MOZ_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_NORMAL,
          ("nsPluginStreamListenerPeer::dtor this=%p, url=%s\n",this, mURLSpec.get()));
 #endif
 
   if (mPStreamListener) {
     mPStreamListener->SetStreamListenerPeer(nullptr);
   }
 
   // close FD of mFileCacheOutputStream if it's still open
@@ -304,17 +304,17 @@ nsPluginStreamListenerPeer::~nsPluginStr
 nsresult nsPluginStreamListenerPeer::Initialize(nsIURI *aURL,
                                                 nsNPAPIPluginInstance *aInstance,
                                                 nsNPAPIPluginStreamListener* aListener)
 {
 #ifdef PLUGIN_LOGGING
   nsAutoCString urlSpec;
   if (aURL != nullptr) aURL->GetSpec(urlSpec);
 
-  PR_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_NORMAL,
+  MOZ_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_NORMAL,
          ("nsPluginStreamListenerPeer::Initialize instance=%p, url=%s\n", aInstance, urlSpec.get()));
 
   PR_LogFlush();
 #endif
 
   // Not gonna work out
   if (!aInstance) {
     return NS_ERROR_FAILURE;
@@ -550,17 +550,17 @@ nsPluginStreamListenerPeer::OnStartReque
     return rv;
 
   aURL->GetSpec(mURLSpec);
 
   if (!contentType.IsEmpty())
     mContentType = contentType;
 
 #ifdef PLUGIN_LOGGING
-  PR_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_NOISY,
+  MOZ_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_NOISY,
          ("nsPluginStreamListenerPeer::OnStartRequest this=%p request=%p mime=%s, url=%s\n",
           this, request, contentType.get(), mURLSpec.get()));
 
   PR_LogFlush();
 #endif
 
   // Set up the stream listener...
   rv = SetUpStreamListener(request, aURL);
--- a/dom/plugins/ipc/PluginInstanceChild.cpp
+++ b/dom/plugins/ipc/PluginInstanceChild.cpp
@@ -495,17 +495,17 @@ PluginInstanceChild::NPN_GetValue(NPNVar
     case NPNVasdEnabledBool:
     case NPNVisOfflineBool:
     case NPNVSupportsXEmbedBool:
     case NPNVSupportsWindowless:
         NS_NOTREACHED("NPNVariable should be handled in PluginModuleChild.");
 #endif
 
     default:
-        PR_LOG(GetPluginLog(), PR_LOG_WARNING,
+        MOZ_LOG(GetPluginLog(), PR_LOG_WARNING,
                ("In PluginInstanceChild::NPN_GetValue: Unhandled NPNVariable %i (%s)",
                 (int) aVar, NPNVariableToString(aVar)));
         return NPERR_GENERIC_ERROR;
     }
 
 }
 
 #ifdef MOZ_WIDGET_COCOA
@@ -524,17 +524,17 @@ PluginInstanceChild::Invalidate()
 
     InvalidateRect(&windowRect);
 }
 #endif
 
 NPError
 PluginInstanceChild::NPN_SetValue(NPPVariable aVar, void* aValue)
 {
-    PR_LOG(GetPluginLog(), PR_LOG_DEBUG, ("%s (aVar=%i, aValue=%p)",
+    MOZ_LOG(GetPluginLog(), PR_LOG_DEBUG, ("%s (aVar=%i, aValue=%p)",
                                       FULLFUNCTION, (int) aVar, aValue));
 
     AssertPluginThread();
 
     switch (aVar) {
     case NPPVpluginWindowBool: {
         NPError rv;
         bool windowed = (NPBool) (intptr_t) aValue;
@@ -613,17 +613,17 @@ PluginInstanceChild::NPN_SetValue(NPPVar
         PLUGIN_LOG_DEBUG(("  Plugin requested event model id # %i\n",
             eventModel));
 
         return rv;
     }
 #endif
 
     default:
-        PR_LOG(GetPluginLog(), PR_LOG_WARNING,
+        MOZ_LOG(GetPluginLog(), PR_LOG_WARNING,
                ("In PluginInstanceChild::NPN_SetValue: Unhandled NPPVariable %i (%s)",
                 (int) aVar, NPPVariableToString(aVar)));
         return NPERR_GENERIC_ERROR;
     }
 }
 
 bool
 PluginInstanceChild::AnswerNPP_GetValue_NPPVpluginWantsAllNetworkStreams(
@@ -2202,17 +2202,17 @@ PluginInstanceChild::FlashThrottleMessag
         task, kFlashWMUSERMessageThrottleDelayMs);
 }
 
 #endif // OS_WIN
 
 bool
 PluginInstanceChild::AnswerSetPluginFocus()
 {
-    PR_LOG(GetPluginLog(), PR_LOG_DEBUG, ("%s", FULLFUNCTION));
+    MOZ_LOG(GetPluginLog(), PR_LOG_DEBUG, ("%s", FULLFUNCTION));
 
 #if defined(OS_WIN)
     // Parent is letting us know the dom set focus to the plugin. Note,
     // focus can change during transit in certain edge cases, for example
     // when a button click brings up a full screen window. Since we send
     // this in response to a WM_SETFOCUS event on our parent, the parent
     // should have focus when we receive this. If not, ignore the call.
     if (::GetFocus() == mPluginWindowHWND ||
@@ -2225,17 +2225,17 @@ PluginInstanceChild::AnswerSetPluginFocu
     NS_NOTREACHED("PluginInstanceChild::AnswerSetPluginFocus not implemented!");
     return false;
 #endif
 }
 
 bool
 PluginInstanceChild::AnswerUpdateWindow()
 {
-    PR_LOG(GetPluginLog(), PR_LOG_DEBUG, ("%s", FULLFUNCTION));
+    MOZ_LOG(GetPluginLog(), PR_LOG_DEBUG, ("%s", FULLFUNCTION));
 
 #if defined(OS_WIN)
     if (mPluginWindowHWND) {
         RECT rect;
         if (GetUpdateRect(GetParent(mPluginWindowHWND), &rect, FALSE)) {
             ::InvalidateRect(mPluginWindowHWND, &rect, FALSE); 
         }
         UpdateWindow(mPluginWindowHWND);
--- a/dom/plugins/ipc/PluginInstanceParent.cpp
+++ b/dom/plugins/ipc/PluginInstanceParent.cpp
@@ -1114,17 +1114,17 @@ PluginInstanceParent::NPP_GetValue(NPPVa
         }
 
         (*(nsCString*)_retval) = plugId;
         return NPERR_NO_ERROR;
     }
 #endif
 
     default:
-        PR_LOG(GetPluginLog(), PR_LOG_WARNING,
+        MOZ_LOG(GetPluginLog(), PR_LOG_WARNING,
                ("In PluginInstanceParent::NPP_GetValue: Unhandled NPPVariable %i (%s)",
                 (int) aVariable, NPPVariableToString(aVariable)));
         return NPERR_GENERIC_ERROR;
     }
 }
 
 NPError
 PluginInstanceParent::NPP_SetValue(NPNVariable variable, void* value)
@@ -1135,17 +1135,17 @@ PluginInstanceParent::NPP_SetValue(NPNVa
         if (!CallNPP_SetValue_NPNVprivateModeBool(*static_cast<NPBool*>(value),
                                                   &result))
             return NPERR_GENERIC_ERROR;
 
         return result;
 
     default:
         NS_ERROR("Unhandled NPNVariable in NPP_SetValue");
-        PR_LOG(GetPluginLog(), PR_LOG_WARNING,
+        MOZ_LOG(GetPluginLog(), PR_LOG_WARNING,
                ("In PluginInstanceParent::NPP_SetValue: Unhandled NPNVariable %i (%s)",
                 (int) variable, NPNVariableToString(variable)));
         return NPERR_GENERIC_ERROR;
     }
 }
 
 void
 PluginInstanceParent::NPP_URLRedirectNotify(const char* url, int32_t status,
--- a/dom/plugins/ipc/PluginMessageUtils.h
+++ b/dom/plugins/ipc/PluginMessageUtils.h
@@ -57,19 +57,19 @@ extern PRLogModuleInfo* GetPluginLog();
 #if defined(_MSC_VER)
 #define FULLFUNCTION __FUNCSIG__
 #elif defined(__GNUC__)
 #define FULLFUNCTION __PRETTY_FUNCTION__
 #else
 #define FULLFUNCTION __FUNCTION__
 #endif
 
-#define PLUGIN_LOG_DEBUG(args) PR_LOG(GetPluginLog(), PR_LOG_DEBUG, args)
-#define PLUGIN_LOG_DEBUG_FUNCTION PR_LOG(GetPluginLog(), PR_LOG_DEBUG, ("%s", FULLFUNCTION))
-#define PLUGIN_LOG_DEBUG_METHOD PR_LOG(GetPluginLog(), PR_LOG_DEBUG, ("%s [%p]", FULLFUNCTION, (void*) this))
+#define PLUGIN_LOG_DEBUG(args) MOZ_LOG(GetPluginLog(), PR_LOG_DEBUG, args)
+#define PLUGIN_LOG_DEBUG_FUNCTION MOZ_LOG(GetPluginLog(), PR_LOG_DEBUG, ("%s", FULLFUNCTION))
+#define PLUGIN_LOG_DEBUG_METHOD MOZ_LOG(GetPluginLog(), PR_LOG_DEBUG, ("%s [%p]", FULLFUNCTION, (void*) this))
 
 /**
  * This is NPByteRange without the linked list.
  */
 struct IPCByteRange
 {
   int32_t offset;
   uint32_t length;
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -2367,17 +2367,17 @@ PluginModuleParent::NP_GetMIMEDescriptio
     *mimeDesc = "application/x-foobar";
     return NS_OK;
 }
 
 nsresult
 PluginModuleParent::NP_GetValue(void *future, NPPVariable aVariable,
                                    void *aValue, NPError* error)
 {
-    PR_LOG(GetPluginLog(), PR_LOG_WARNING, ("%s Not implemented, requested variable %i", __FUNCTION__,
+    MOZ_LOG(GetPluginLog(), PR_LOG_WARNING, ("%s Not implemented, requested variable %i", __FUNCTION__,
                                         (int) aVariable));
 
     //TODO: implement this correctly
     *error = NPERR_GENERIC_ERROR;
     return NS_OK;
 }
 
 #if defined(XP_WIN) || defined(XP_MACOSX)
--- a/dom/security/nsCSPContext.cpp
+++ b/dom/security/nsCSPContext.cpp
@@ -46,17 +46,17 @@ static PRLogModuleInfo *
 GetCspContextLog()
 {
   static PRLogModuleInfo *gCspContextPRLog;
   if (!gCspContextPRLog)
     gCspContextPRLog = PR_NewLogModule("CSPContext");
   return gCspContextPRLog;
 }
 
-#define CSPCONTEXTLOG(args) PR_LOG(GetCspContextLog(), PR_LOG_DEBUG, args)
+#define CSPCONTEXTLOG(args) MOZ_LOG(GetCspContextLog(), PR_LOG_DEBUG, args)
 #define CSPCONTEXTLOGENABLED() PR_LOG_TEST(GetCspContextLog(), PR_LOG_DEBUG)
 
 static const uint32_t CSP_CACHE_URI_CUTOFF_SIZE = 512;
 
 /**
  * Creates a key for use in the ShouldLoad cache.
  * Looks like: <uri>!<nsIContentPolicy::LOAD_TYPE>
  */
--- a/dom/security/nsCSPParser.cpp
+++ b/dom/security/nsCSPParser.cpp
@@ -23,17 +23,17 @@ static PRLogModuleInfo*
 GetCspParserLog()
 {
   static PRLogModuleInfo* gCspParserPRLog;
   if (!gCspParserPRLog)
     gCspParserPRLog = PR_NewLogModule("CSPParser");
   return gCspParserPRLog;
 }
 
-#define CSPPARSERLOG(args) PR_LOG(GetCspParserLog(), PR_LOG_DEBUG, args)
+#define CSPPARSERLOG(args) MOZ_LOG(GetCspParserLog(), PR_LOG_DEBUG, args)
 #define CSPPARSERLOGENABLED() PR_LOG_TEST(GetCspParserLog(), PR_LOG_DEBUG)
 
 static const char16_t COLON        = ':';
 static const char16_t SEMICOLON    = ';';
 static const char16_t SLASH        = '/';
 static const char16_t PLUS         = '+';
 static const char16_t DASH         = '-';
 static const char16_t DOT          = '.';
--- a/dom/security/nsCSPService.cpp
+++ b/dom/security/nsCSPService.cpp
@@ -107,17 +107,17 @@ CSPService::ShouldLoad(uint32_t aContent
 {
   if (!aContentLocation) {
     return NS_ERROR_FAILURE;
   }
 
   if (PR_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
     nsAutoCString location;
     aContentLocation->GetSpec(location);
-    PR_LOG(gCspPRLog, PR_LOG_DEBUG,
+    MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
            ("CSPService::ShouldLoad called for %s", location.get()));
   }
 
   // default decision, CSP can revise it if there's a policy to enforce
   *aDecision = nsIContentPolicy::ACCEPT;
 
   // No need to continue processing if CSP is disabled or if the protocol
   // is *not* subject to CSP.
@@ -206,17 +206,17 @@ CSPService::ShouldLoad(uint32_t aContent
     if (csp) {
       if (PR_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
         uint32_t numPolicies = 0;
         nsresult rv = csp->GetPolicyCount(&numPolicies);
         if (NS_SUCCEEDED(rv)) {
           for (uint32_t i=0; i<numPolicies; i++) {
             nsAutoString policy;
             csp->GetPolicy(i, policy);
-            PR_LOG(gCspPRLog, PR_LOG_DEBUG,
+            MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
                    ("Document has CSP[%d]: %s", i,
                    NS_ConvertUTF16toUTF8(policy).get()));
           }
         }
       }
       // obtain the enforcement decision
       // (don't pass aExtra, we use that slot for redirects)
       csp->ShouldLoad(aContentType,
@@ -226,17 +226,17 @@ CSPService::ShouldLoad(uint32_t aContent
                       aMimeTypeGuess,
                       nullptr,
                       aDecision);
     }
   }
   else if (PR_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
     nsAutoCString uriSpec;
     aContentLocation->GetSpec(uriSpec);
-    PR_LOG(gCspPRLog, PR_LOG_DEBUG,
+    MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
            ("COULD NOT get nsINode for location: %s", uriSpec.get()));
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 CSPService::ShouldProcess(uint32_t         aContentType,
@@ -314,26 +314,26 @@ CSPService::AsyncOnChannelRedirect(nsICh
                   nullptr,        // nsISupports
                   EmptyCString(), // ACString - MIME guess
                   originalUri,    // aMimeTypeGuess
                   &aDecision);
 
   if (newUri && PR_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
     nsAutoCString newUriSpec("None");
     newUri->GetSpec(newUriSpec);
-    PR_LOG(gCspPRLog, PR_LOG_DEBUG,
+    MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
            ("CSPService::AsyncOnChannelRedirect called for %s",
             newUriSpec.get()));
   }
   if (aDecision == 1) {
-    PR_LOG(gCspPRLog, PR_LOG_DEBUG,
+    MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
            ("CSPService::AsyncOnChannelRedirect ALLOWING request."));
   }
   else {
-    PR_LOG(gCspPRLog, PR_LOG_DEBUG,
+    MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
            ("CSPService::AsyncOnChannelRedirect CANCELLING request."));
   }
 
   // if ShouldLoad doesn't accept the load, cancel the request
   if (!NS_CP_ACCEPTED(aDecision)) {
     autoCallback.DontCallback();
     return NS_BINDING_FAILED;
   }
--- a/dom/security/nsCSPUtils.cpp
+++ b/dom/security/nsCSPUtils.cpp
@@ -18,17 +18,17 @@ static PRLogModuleInfo*
 GetCspUtilsLog()
 {
   static PRLogModuleInfo* gCspUtilsPRLog;
   if (!gCspUtilsPRLog)
     gCspUtilsPRLog = PR_NewLogModule("CSPUtils");
   return gCspUtilsPRLog;
 }
 
-#define CSPUTILSLOG(args) PR_LOG(GetCspUtilsLog(), PR_LOG_DEBUG, args)
+#define CSPUTILSLOG(args) MOZ_LOG(GetCspUtilsLog(), PR_LOG_DEBUG, args)
 #define CSPUTILSLOGENABLED() PR_LOG_TEST(GetCspUtilsLog(), PR_LOG_DEBUG)
 
 void
 CSP_GetLocalizedStr(const char16_t* aName,
                     const char16_t** aParams,
                     uint32_t aLength,
                     char16_t** outResult)
 {
--- a/dom/xslt/xslt/txExecutionState.cpp
+++ b/dom/xslt/xslt/txExecutionState.cpp
@@ -379,17 +379,17 @@ txExecutionState::retrieveDocument(const
 {
     NS_ASSERTION(aUri.FindChar(char16_t('#')) == kNotFound,
                  "Remove the fragment.");
 
     if (mDisableLoads) {
         return nullptr;
     }
 
-    PR_LOG(txLog::xslt, PR_LOG_DEBUG,
+    MOZ_LOG(txLog::xslt, PR_LOG_DEBUG,
            ("Retrieve Document %s", NS_LossyConvertUTF16toASCII(aUri).get()));
 
     // try to get already loaded document
     txLoadedDocumentEntry *entry = mLoadedDocuments.PutEntry(aUri);
     if (!entry) {
         return nullptr;
     }
 
--- a/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
+++ b/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
@@ -514,17 +514,17 @@ txCompileObserver::startLoad(nsIURI* aUr
 nsresult
 TX_LoadSheet(nsIURI* aUri, txMozillaXSLTProcessor* aProcessor,
              nsIDocument* aLoaderDocument, ReferrerPolicy aReferrerPolicy)
 {
     nsIPrincipal* principal = aLoaderDocument->NodePrincipal();
 
     nsAutoCString spec;
     aUri->GetSpec(spec);
-    PR_LOG(txLog::xslt, PR_LOG_ALWAYS, ("TX_LoadSheet: %s\n", spec.get()));
+    MOZ_LOG(txLog::xslt, PR_LOG_ALWAYS, ("TX_LoadSheet: %s\n", spec.get()));
 
     // Content Policy
     int16_t shouldLoad = nsIContentPolicy::ACCEPT;
     nsresult rv =
         NS_CheckContentLoadPolicy(nsIContentPolicy::TYPE_STYLESHEET,
                                   aUri,
                                   principal,
                                   aLoaderDocument,
--- a/dom/xslt/xslt/txMozillaXMLOutput.cpp
+++ b/dom/xslt/xslt/txMozillaXMLOutput.cpp
@@ -259,17 +259,17 @@ txMozillaXMLOutput::endDocument(nsresult
 
 nsresult
 txMozillaXMLOutput::endElement()
 {
     TX_ENSURE_CURRENTNODE;
 
     if (mBadChildLevel) {
         --mBadChildLevel;
-        PR_LOG(txLog::xslt, PR_LOG_DEBUG,
+        MOZ_LOG(txLog::xslt, PR_LOG_DEBUG,
                ("endElement, mBadChildLevel = %d\n", mBadChildLevel));
         return NS_OK;
     }
     
     --mTreeDepth;
 
     nsresult rv = closePrevious(true);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -488,30 +488,30 @@ nsresult
 txMozillaXMLOutput::startElementInternal(nsIAtom* aPrefix,
                                          nsIAtom* aLocalName,
                                          int32_t aNsID)
 {
     TX_ENSURE_CURRENTNODE;
 
     if (mBadChildLevel) {
         ++mBadChildLevel;
-        PR_LOG(txLog::xslt, PR_LOG_DEBUG,
+        MOZ_LOG(txLog::xslt, PR_LOG_DEBUG,
                ("startElement, mBadChildLevel = %d\n", mBadChildLevel));
         return NS_OK;
     }
 
     nsresult rv = closePrevious(true);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // Push and init state
     if (mTreeDepth == MAX_REFLOW_DEPTH) {
         // eCloseElement couldn't add the parent so we fail as well or we've
         // reached the limit of the depth of the tree that we allow.
         ++mBadChildLevel;
-        PR_LOG(txLog::xslt, PR_LOG_DEBUG,
+        MOZ_LOG(txLog::xslt, PR_LOG_DEBUG,
                ("startElement, mBadChildLevel = %d\n", mBadChildLevel));
         return NS_OK;
     }
 
     ++mTreeDepth;
 
     rv = mTableStateStack.push(NS_INT32_TO_PTR(mTableState));
     NS_ENSURE_SUCCESS(rv, rv);
--- a/dom/xslt/xslt/txStylesheet.cpp
+++ b/dom/xslt/xslt/txStylesheet.cpp
@@ -163,24 +163,24 @@ txStylesheet::findTemplate(const txXPath
           aMode.mLocalName->ToString(mode);
       }
       txXPathNodeUtils::getNodeName(aNode, nodeName);
       if (matchTemplate) {
           nsAutoString matchAttr;
 #ifdef TX_TO_STRING
           match->toString(matchAttr);
 #endif
-          PR_LOG(txLog::xslt, PR_LOG_DEBUG,
+          MOZ_LOG(txLog::xslt, PR_LOG_DEBUG,
                  ("MatchTemplate, Pattern %s, Mode %s, Node %s\n",
                   NS_LossyConvertUTF16toASCII(matchAttr).get(),
                   NS_LossyConvertUTF16toASCII(mode).get(),
                   NS_LossyConvertUTF16toASCII(nodeName).get()));
       }
       else {
-          PR_LOG(txLog::xslt, PR_LOG_DEBUG,
+          MOZ_LOG(txLog::xslt, PR_LOG_DEBUG,
                  ("No match, Node %s, Mode %s\n", 
                   NS_LossyConvertUTF16toASCII(nodeName).get(),
                   NS_LossyConvertUTF16toASCII(mode).get()));
       }
     }
 
     if (!matchTemplate) {
         // Test for these first since a node can be both a text node
--- a/dom/xslt/xslt/txStylesheetCompiler.cpp
+++ b/dom/xslt/xslt/txStylesheetCompiler.cpp
@@ -372,33 +372,33 @@ txStylesheetCompiler::characters(const n
     mCharacters.Append(aStr);
 
     return NS_OK;
 }
 
 nsresult
 txStylesheetCompiler::doneLoading()
 {
-    PR_LOG(txLog::xslt, PR_LOG_ALWAYS,
+    MOZ_LOG(txLog::xslt, PR_LOG_ALWAYS,
            ("Compiler::doneLoading: %s\n",
             NS_LossyConvertUTF16toASCII(mStylesheetURI).get()));
     if (NS_FAILED(mStatus)) {
         return mStatus;
     }
 
     mDoneWithThisStylesheet = true;
 
     return maybeDoneCompiling();
 }
 
 void
 txStylesheetCompiler::cancel(nsresult aError, const char16_t *aErrorText,
                              const char16_t *aParam)
 {
-    PR_LOG(txLog::xslt, PR_LOG_ALWAYS,
+    MOZ_LOG(txLog::xslt, PR_LOG_ALWAYS,
            ("Compiler::cancel: %s, module: %d, code %d\n",
             NS_LossyConvertUTF16toASCII(mStylesheetURI).get(),
             NS_ERROR_GET_MODULE(aError),
             NS_ERROR_GET_CODE(aError)));
     if (NS_SUCCEEDED(mStatus)) {
         mStatus = aError;
     }
 
@@ -417,17 +417,17 @@ txStylesheetCompiler::getStylesheet()
 }
 
 nsresult
 txStylesheetCompiler::loadURI(const nsAString& aUri,
                               const nsAString& aReferrerUri,
                               ReferrerPolicy aReferrerPolicy,
                               txStylesheetCompiler* aCompiler)
 {
-    PR_LOG(txLog::xslt, PR_LOG_ALWAYS,
+    MOZ_LOG(txLog::xslt, PR_LOG_ALWAYS,
            ("Compiler::loadURI forwards %s thru %s\n",
             NS_LossyConvertUTF16toASCII(aUri).get(),
             NS_LossyConvertUTF16toASCII(mStylesheetURI).get()));
     if (mStylesheetURI.Equals(aUri)) {
         return NS_ERROR_XSLT_LOAD_RECURSION;
     }
     return mObserver ?
         mObserver->loadURI(aUri, aReferrerUri, aReferrerPolicy, aCompiler) :
@@ -671,17 +671,17 @@ txStylesheetCompilerState::popObject()
 {
     return static_cast<txObject*>(mObjectStack.pop());
 }
 
 nsresult
 txStylesheetCompilerState::pushPtr(void* aPtr, enumStackType aType)
 {
 #ifdef TX_DEBUG_STACK
-    PR_LOG(txLog::xslt, PR_LOG_DEBUG, ("pushPtr: 0x%x type %u\n", aPtr, aType));
+    MOZ_LOG(txLog::xslt, PR_LOG_DEBUG, ("pushPtr: 0x%x type %u\n", aPtr, aType));
 #endif
     mTypeStack.AppendElement(aType);
     return mOtherStack.push(aPtr);
 }
 
 void*
 txStylesheetCompilerState::popPtr(enumStackType aType)
 {
@@ -690,17 +690,17 @@ txStylesheetCompilerState::popPtr(enumSt
         NS_RUNTIMEABORT("Attempt to pop when type stack is empty");
     }
 
     enumStackType type = mTypeStack.ElementAt(stacklen - 1);
     mTypeStack.RemoveElementAt(stacklen - 1);
     void* value = mOtherStack.pop();
     
 #ifdef TX_DEBUG_STACK
-    PR_LOG(txLog::xslt, PR_LOG_DEBUG, ("popPtr: 0x%x type %u requested %u\n", value, type, aType));
+    MOZ_LOG(txLog::xslt, PR_LOG_DEBUG, ("popPtr: 0x%x type %u requested %u\n", value, type, aType));
 #endif
     
     if (type != aType) {
         NS_RUNTIMEABORT("Expected type does not match top element type");
     }
 
     return value;
 }
@@ -745,17 +745,17 @@ txStylesheetCompilerState::addInstructio
     mGotoTargetPointers.Clear();
 
     return NS_OK;
 }
 
 nsresult
 txStylesheetCompilerState::loadIncludedStylesheet(const nsAString& aURI)
 {
-    PR_LOG(txLog::xslt, PR_LOG_ALWAYS,
+    MOZ_LOG(txLog::xslt, PR_LOG_ALWAYS,
            ("CompilerState::loadIncludedStylesheet: %s\n",
             NS_LossyConvertUTF16toASCII(aURI).get()));
     if (mStylesheetURI.Equals(aURI)) {
         return NS_ERROR_XSLT_LOAD_RECURSION;
     }
     NS_ENSURE_TRUE(mObserver, NS_ERROR_NOT_IMPLEMENTED);
 
     nsAutoPtr<txToplevelItem> item(new txDummyItem);
@@ -790,17 +790,17 @@ txStylesheetCompilerState::loadIncludedS
 
     return rv;
 }
 
 nsresult
 txStylesheetCompilerState::loadImportedStylesheet(const nsAString& aURI,
                                                   txStylesheet::ImportFrame* aFrame)
 {
-    PR_LOG(txLog::xslt, PR_LOG_ALWAYS,
+    MOZ_LOG(txLog::xslt, PR_LOG_ALWAYS,
            ("CompilerState::loadImportedStylesheet: %s\n",
             NS_LossyConvertUTF16toASCII(aURI).get()));
     if (mStylesheetURI.Equals(aURI)) {
         return NS_ERROR_XSLT_LOAD_RECURSION;
     }
     NS_ENSURE_TRUE(mObserver, NS_ERROR_NOT_IMPLEMENTED);
 
     txListIterator iter(&aFrame->mToplevelItems);
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -378,17 +378,17 @@ XULDocument::StartDocumentLoad(const cha
     if (PR_LOG_TEST(gXULLog, PR_LOG_WARNING)) {
 
         nsCOMPtr<nsIURI> uri;
         nsresult rv = aChannel->GetOriginalURI(getter_AddRefs(uri));
         if (NS_SUCCEEDED(rv)) {
             nsAutoCString urlspec;
             rv = uri->GetSpec(urlspec);
             if (NS_SUCCEEDED(rv)) {
-                PR_LOG(gXULLog, PR_LOG_WARNING,
+                MOZ_LOG(gXULLog, PR_LOG_WARNING,
                        ("xul: load document '%s'", urlspec.get()));
             }
         }
     }
     // NOTE: If this ever starts calling nsDocument::StartDocumentLoad
     // we'll possibly need to reset our content type afterwards.
     mStillWalking = true;
     mMayStartLayout = false;
@@ -558,17 +558,17 @@ XULDocument::EndLoad()
         }
     }
 
     OnPrototypeLoadDone(true);
     if (PR_LOG_TEST(gXULLog, PR_LOG_WARNING)) {
         nsAutoCString urlspec;
         rv = uri->GetSpec(urlspec);
         if (NS_SUCCEEDED(rv)) {
-            PR_LOG(gXULLog, PR_LOG_WARNING,
+            MOZ_LOG(gXULLog, PR_LOG_WARNING,
                    ("xul: Finished loading document '%s'", urlspec.get()));
         }
     }
 }
 
 NS_IMETHODIMP
 XULDocument::OnPrototypeLoadDone(bool aResumeWalk)
 {
@@ -2273,17 +2273,17 @@ XULDocument::PrepareToWalk()
     if (! proto) {
         if (PR_LOG_TEST(gXULLog, PR_LOG_ERROR)) {
             nsCOMPtr<nsIURI> url = mCurrentPrototype->GetURI();
 
             nsAutoCString urlspec;
             rv = url->GetSpec(urlspec);
             if (NS_FAILED(rv)) return rv;
 
-            PR_LOG(gXULLog, PR_LOG_ERROR,
+            MOZ_LOG(gXULLog, PR_LOG_ERROR,
                    ("xul: error parsing '%s'", urlspec.get()));
         }
 
         return NS_OK;
     }
 
     uint32_t piInsertionPoint = 0;
     if (mState != eState_Master) {
@@ -2548,17 +2548,17 @@ XULDocument::LoadOverlayInternal(nsIURI*
         nsAutoCString parentDoc;
         nsCOMPtr<nsIURI> uri;
         nsresult rv = mChannel->GetOriginalURI(getter_AddRefs(uri));
         if (NS_SUCCEEDED(rv))
             rv = uri->GetSpec(parentDoc);
         if (!(parentDoc.get()))
             parentDoc = "";
 
-        PR_LOG(gXULLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULLog, PR_LOG_DEBUG,
                 ("xul: %s loading overlay %s", parentDoc.get(), urlspec.get()));
     }
 
     if (aIsDynamic)
         mResolutionPhase = nsForwardReference::eStart;
 
     // Chrome documents are allowed to load overlays from anywhere.
     // In all other cases, the overlay is only allowed to load if
@@ -2608,29 +2608,29 @@ XULDocument::LoadOverlayInternal(nsIURI*
             // Return to the main event loop and eagerly await the
             // prototype overlay load's completion. When the content
             // sink completes, it will trigger an EndLoad(), which'll
             // wind us back up here, in ResumeWalk().
             *aShouldReturn = true;
             return NS_OK;
         }
 
-        PR_LOG(gXULLog, PR_LOG_DEBUG, ("xul: overlay was cached"));
+        MOZ_LOG(gXULLog, PR_LOG_DEBUG, ("xul: overlay was cached"));
 
         // Found the overlay's prototype in the cache, fully loaded. If
         // this is a dynamic overlay, this will call ResumeWalk.
         // Otherwise, we'll return to ResumeWalk, which called us.
         return OnPrototypeLoadDone(aIsDynamic);
     }
     else {
         // Not there. Initiate a load.
-        PR_LOG(gXULLog, PR_LOG_DEBUG, ("xul: overlay was not cached"));
+        MOZ_LOG(gXULLog, PR_LOG_DEBUG, ("xul: overlay was not cached"));
 
         if (mIsGoingAway) {
-            PR_LOG(gXULLog, PR_LOG_DEBUG, ("xul: ...and document already destroyed"));
+            MOZ_LOG(gXULLog, PR_LOG_DEBUG, ("xul: ...and document already destroyed"));
             return NS_ERROR_NOT_AVAILABLE;
         }
 
         // We'll set the right principal on the proto doc when we get
         // OnStartRequest from the parser, so just pass in a null principal for
         // now.
         nsCOMPtr<nsIParser> parser;
         rv = PrepareToLoadPrototype(aURI, "view", nullptr, getter_AddRefs(parser));
@@ -3572,17 +3572,17 @@ XULDocument::CreateElementFromPrototype(
     NS_PRECONDITION(aPrototype != nullptr, "null ptr");
     if (! aPrototype)
         return NS_ERROR_NULL_POINTER;
 
     *aResult = nullptr;
     nsresult rv = NS_OK;
 
     if (PR_LOG_TEST(gXULLog, PR_LOG_NOTICE)) {
-        PR_LOG(gXULLog, PR_LOG_NOTICE,
+        MOZ_LOG(gXULLog, PR_LOG_NOTICE,
                ("xul: creating <%s> from prototype",
                 NS_ConvertUTF16toUTF8(aPrototype->mNodeInfo->QualifiedName()).get()));
     }
 
     nsRefPtr<Element> result;
 
     if (aPrototype->mNodeInfo->NamespaceEquals(kNameSpaceID_XUL)) {
         // If it's a XUL element, it'll be lightweight until somebody
@@ -3844,17 +3844,17 @@ XULDocument::OverlayForwardReference::Re
         // in the document
         rv = mDocument->AddSubtreeToDocument(target);
         if (NS_FAILED(rv)) return eResolve_Error;
     }
 
     if (PR_LOG_TEST(gXULLog, PR_LOG_NOTICE)) {
         nsAutoCString idC;
         idC.AssignWithConversion(id);
-        PR_LOG(gXULLog, PR_LOG_NOTICE,
+        MOZ_LOG(gXULLog, PR_LOG_NOTICE,
                ("xul: overlay resolved '%s'",
                 idC.get()));
     }
 
     mResolved = true;
     return eResolve_Succeeded;
 }
 
@@ -4026,17 +4026,17 @@ XULDocument::OverlayForwardReference::~O
         nsAutoCString urlspec;
         protoURI->GetSpec(urlspec);
 
         nsCOMPtr<nsIURI> docURI;
         nsAutoCString parentDoc;
         nsresult rv = mDocument->mChannel->GetOriginalURI(getter_AddRefs(docURI));
         if (NS_SUCCEEDED(rv))
             docURI->GetSpec(parentDoc);
-        PR_LOG(gXULLog, PR_LOG_WARNING,
+        MOZ_LOG(gXULLog, PR_LOG_WARNING,
                ("xul: %s overlay failed to resolve '%s' in %s",
                 urlspec.get(), idC.get(), parentDoc.get()));
     }
 }
 
 
 //----------------------------------------------------------------------
 //
@@ -4071,17 +4071,17 @@ XULDocument::BroadcasterHookup::~Broadca
         else {
             mObservesElement->GetAttr(kNameSpaceID_None, nsGkAtoms::observes, broadcasterID);
             attribute.Assign('*');
         }
 
         nsAutoCString attributeC,broadcasteridC;
         attributeC.AssignWithConversion(attribute);
         broadcasteridC.AssignWithConversion(broadcasterID);
-        PR_LOG(gXULLog, PR_LOG_WARNING,
+        MOZ_LOG(gXULLog, PR_LOG_WARNING,
                ("xul: broadcaster hookup failed <%s attribute='%s'> to %s",
                 nsAtomCString(mObservesElement->NodeInfo()->NameAtom()).get(),
                 attributeC.get(),
                 broadcasteridC.get()));
     }
 }
 
 
@@ -4283,17 +4283,17 @@ XULDocument::CheckBroadcasterHookup(Elem
 
         NS_ASSERTION(content != nullptr, "not an nsIContent");
         if (! content)
             return rv;
 
         nsAutoCString attributeC,broadcasteridC;
         attributeC.AssignWithConversion(attribute);
         broadcasteridC.AssignWithConversion(broadcasterID);
-        PR_LOG(gXULLog, PR_LOG_NOTICE,
+        MOZ_LOG(gXULLog, PR_LOG_NOTICE,
                ("xul: broadcaster hookup <%s attribute='%s'> to %s",
                 nsAtomCString(content->NodeInfo()->NameAtom()).get(),
                 attributeC.get(),
                 broadcasteridC.get()));
     }
 
     *aNeedsHookup = false;
     *aDidResolve = true;
--- a/dom/xul/nsXULCommandDispatcher.cpp
+++ b/dom/xul/nsXULCommandDispatcher.cpp
@@ -269,17 +269,17 @@ nsXULCommandDispatcher::AddCommandUpdate
 
 #ifdef DEBUG
       if (PR_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) {
         nsAutoCString eventsC, targetsC, aeventsC, atargetsC; 
         eventsC.AssignWithConversion(updater->mEvents);
         targetsC.AssignWithConversion(updater->mTargets);
         CopyUTF16toUTF8(aEvents, aeventsC);
         CopyUTF16toUTF8(aTargets, atargetsC);
-        PR_LOG(gCommandLog, PR_LOG_NOTICE,
+        MOZ_LOG(gCommandLog, PR_LOG_NOTICE,
                ("xulcmd[%p] replace %p(events=%s targets=%s) with (events=%s targets=%s)",
                 this, aElement,
                 eventsC.get(),
                 targetsC.get(),
                 aeventsC.get(),
                 atargetsC.get()));
       }
 #endif
@@ -296,17 +296,17 @@ nsXULCommandDispatcher::AddCommandUpdate
     updater = updater->mNext;
   }
 #ifdef DEBUG
   if (PR_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) {
     nsAutoCString aeventsC, atargetsC; 
     CopyUTF16toUTF8(aEvents, aeventsC);
     CopyUTF16toUTF8(aTargets, atargetsC);
 
-    PR_LOG(gCommandLog, PR_LOG_NOTICE,
+    MOZ_LOG(gCommandLog, PR_LOG_NOTICE,
            ("xulcmd[%p] add     %p(events=%s targets=%s)",
             this, aElement,
             aeventsC.get(),
             atargetsC.get()));
   }
 #endif
 
   // If we get here, this is a new updater. Append it to the list.
@@ -330,17 +330,17 @@ nsXULCommandDispatcher::RemoveCommandUpd
 
   while (updater) {
     if (updater->mElement == aElement) {
 #ifdef DEBUG
       if (PR_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) {
         nsAutoCString eventsC, targetsC; 
         eventsC.AssignWithConversion(updater->mEvents);
         targetsC.AssignWithConversion(updater->mTargets);
-        PR_LOG(gCommandLog, PR_LOG_NOTICE,
+        MOZ_LOG(gCommandLog, PR_LOG_NOTICE,
                ("xulcmd[%p] remove  %p(events=%s targets=%s)",
                 this, aElement,
                 eventsC.get(),
                 targetsC.get()));
       }
 #endif
 
       *link = updater->mNext;
@@ -389,17 +389,17 @@ nsXULCommandDispatcher::UpdateCommands(c
 
   for (int32_t u = 0; u < updaters.Count(); u++) {
     nsIContent* content = updaters[u];
 
 #ifdef DEBUG
     if (PR_LOG_TEST(gCommandLog, PR_LOG_NOTICE)) {
       nsAutoCString aeventnameC; 
       CopyUTF16toUTF8(aEventName, aeventnameC);
-      PR_LOG(gCommandLog, PR_LOG_NOTICE,
+      MOZ_LOG(gCommandLog, PR_LOG_NOTICE,
              ("xulcmd[%p] update %p event=%s",
               this, content,
               aeventnameC.get()));
     }
 #endif
 
     WidgetEvent event(true, NS_XUL_COMMAND_UPDATE);
     EventDispatcher::Dispatch(content, nullptr, &event);
--- a/dom/xul/nsXULContentSink.cpp
+++ b/dom/xul/nsXULContentSink.cpp
@@ -472,17 +472,17 @@ XULContentSinkImpl::HandleStartElement(c
       break;
 
   case eInDocumentElement:
       rv = OpenTag(aAtts, aAttsCount, aLineNumber, nodeInfo);
       break;
 
   case eInEpilog:
   case eInScript:
-      PR_LOG(gContentSinkLog, PR_LOG_WARNING,
+      MOZ_LOG(gContentSinkLog, PR_LOG_WARNING,
              ("xul: warning: unexpected tags in epilog at line %d",
              aLineNumber));
       rv = NS_ERROR_UNEXPECTED; // XXX
       break;
   }
 
   return rv;
 }
@@ -723,31 +723,31 @@ XULContentSinkImpl::OpenRoot(const char1
     NS_ASSERTION(mState == eInProlog, "how'd we get here?");
     if (mState != eInProlog)
         return NS_ERROR_UNEXPECTED;
 
     nsresult rv;
 
     if (aNodeInfo->Equals(nsGkAtoms::script, kNameSpaceID_XHTML) ||
         aNodeInfo->Equals(nsGkAtoms::script, kNameSpaceID_XUL)) {
-        PR_LOG(gContentSinkLog, PR_LOG_ERROR,
+        MOZ_LOG(gContentSinkLog, PR_LOG_ERROR,
                ("xul: script tag not allowed as root content element"));
 
         return NS_ERROR_UNEXPECTED;
     }
 
     // Create the element
     nsXULPrototypeElement* element;
     rv = CreateElement(aNodeInfo, &element);
 
     if (NS_FAILED(rv)) {
         if (PR_LOG_TEST(gContentSinkLog, PR_LOG_ERROR)) {
             nsAutoString anodeC;
             aNodeInfo->GetName(anodeC);
-            PR_LOG(gContentSinkLog, PR_LOG_ERROR,
+            MOZ_LOG(gContentSinkLog, PR_LOG_ERROR,
                    ("xul: unable to create element '%s' at line %d",
                     NS_ConvertUTF16toUTF8(anodeC).get(),
                     -1)); // XXX pass in line number
         }
 
         return rv;
     }
 
@@ -778,17 +778,17 @@ XULContentSinkImpl::OpenTag(const char16
     // Create the element
     nsXULPrototypeElement* element;
     rv = CreateElement(aNodeInfo, &element);
 
     if (NS_FAILED(rv)) {
         if (PR_LOG_TEST(gContentSinkLog, PR_LOG_ERROR)) {
             nsAutoString anodeC;
             aNodeInfo->GetName(anodeC);
-            PR_LOG(gContentSinkLog, PR_LOG_ERROR,
+            MOZ_LOG(gContentSinkLog, PR_LOG_ERROR,
                    ("xul: unable to create element '%s' at line %d",
                     NS_ConvertUTF16toUTF8(anodeC).get(),
                     aLineNumber));
         }
 
         return rv;
     }
 
@@ -980,17 +980,17 @@ XULContentSinkImpl::AddAttributes(const 
       if (PR_LOG_TEST(gContentSinkLog, PR_LOG_DEBUG)) {
           nsAutoString extraWhiteSpace;
           int32_t cnt = mContextStack.Depth();
           while (--cnt >= 0)
               extraWhiteSpace.AppendLiteral("  ");
           nsAutoString qnameC,valueC;
           qnameC.Assign(aAttributes[0]);
           valueC.Assign(aAttributes[1]);
-          PR_LOG(gContentSinkLog, PR_LOG_DEBUG,
+          MOZ_LOG(gContentSinkLog, PR_LOG_DEBUG,
                  ("xul: %.5d. %s    %s=%s",
                   -1, // XXX pass in line number
                   NS_ConvertUTF16toUTF8(extraWhiteSpace).get(),
                   NS_ConvertUTF16toUTF8(qnameC).get(),
                   NS_ConvertUTF16toUTF8(valueC).get()));
       }
   }
 
--- a/dom/xul/templates/nsContentTestNode.cpp
+++ b/dom/xul/templates/nsContentTestNode.cpp
@@ -27,17 +27,17 @@ nsContentTestNode::nsContentTestNode(nsX
         nsAutoString tag(NS_LITERAL_STRING("(none)"));
         if (mTag)
             mTag->ToString(tag);
 
         nsAutoString refvar(NS_LITERAL_STRING("(none)"));
         if (aRefVariable)
             aRefVariable->ToString(refvar);
 
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("nsContentTestNode[%p]: ref-var=%s tag=%s",
                 this, NS_ConvertUTF16toUTF8(refvar).get(),
                 NS_ConvertUTF16toUTF8(tag).get()));
     }
 }
 
 nsresult
 nsContentTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
--- a/dom/xul/templates/nsInstantiationNode.cpp
+++ b/dom/xul/templates/nsInstantiationNode.cpp
@@ -10,17 +10,17 @@
 #include "mozilla/Logging.h"
 extern PRLogModuleInfo* gXULTemplateLog;
 
 nsInstantiationNode::nsInstantiationNode(nsXULTemplateQueryProcessorRDF* aProcessor,
                                          nsRDFQuery* aQuery)
         : mProcessor(aProcessor),
           mQuery(aQuery)
 {
-    PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+    MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
            ("nsInstantiationNode[%p] query=%p", this, aQuery));
 
     MOZ_COUNT_CTOR(nsInstantiationNode);
 }
 
 
 nsInstantiationNode::~nsInstantiationNode()
 {
--- a/dom/xul/templates/nsRDFConInstanceTestNode.cpp
+++ b/dom/xul/templates/nsRDFConInstanceTestNode.cpp
@@ -53,17 +53,17 @@ nsRDFConInstanceTestNode::nsRDFConInstan
 
             props += str;
         }
 
         nsAutoString cvar(NS_LITERAL_STRING("(none)"));
         if (mContainerVariable)
             mContainerVariable->ToString(cvar);
 
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("nsRDFConInstanceTestNode[%p]: parent=%p member-props=(%s) container-var=%s container=%s empty=%s",
                 this,
                 aParent,
                 props.get(),
                 NS_ConvertUTF16toUTF8(cvar).get(),
                 TestToString(aContainer),
                 TestToString(aEmpty)));
     }
@@ -99,17 +99,17 @@ nsRDFConInstanceTestNode::FilterInstanti
             aInstantiations.Erase(inst--);
             continue;
         }
 
         if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
             const char* container = "(unbound)";
             valueres->GetValueConst(&container);
 
-            PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+            MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                    ("nsRDFConInstanceTestNode[%p]::FilterInstantiations() container=[%s]",
                     this, container));
         }
 
         nsCOMPtr<nsIRDFContainer> rdfcontainer;
 
         bool isRDFContainer;
         rv = rdfc->IsContainer(ds, valueres, &isRDFContainer);
@@ -187,21 +187,21 @@ nsRDFConInstanceTestNode::FilterInstanti
                         if (mProcessor->ContainmentProperties().Contains(property)) {
                             container = eTrue;
                             break;
                         }
                     }
                 }
             }
 
-            PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+            MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                    ("    empty => %s",
                     (empty == mEmpty) ? "consistent" : "inconsistent"));
 
-            PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+            MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                    ("    container => %s",
                     (container == mContainer) ? "consistent" : "inconsistent"));
 
             if (((mEmpty == empty) && (mContainer == container)) ||
                 ((mEmpty == eDontCare) && (mContainer == container)) ||
                 ((mContainer == eDontCare) && (mEmpty == empty)))
             {
                 Element* element =
@@ -250,17 +250,17 @@ nsRDFConInstanceTestNode::CanPropagate(n
         aSource->GetValueConst(&source);
 
         const char* property;
         aProperty->GetValueConst(&property);
 
         nsAutoString target;
         nsXULContentUtils::GetTextForNode(aTarget, target);
 
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("nsRDFConInstanceTestNode[%p]: CanPropagate([%s]==[%s]=>[%s]) => %s",
                 this, source, property, NS_ConvertUTF16toUTF8(target).get(),
                 canpropagate ? "true" : "false"));
     }
 
     if (canpropagate) {
         aInitialBindings.AddAssignment(mContainerVariable, aSource);
         return true;
--- a/dom/xul/templates/nsRDFConMemberTestNode.cpp
+++ b/dom/xul/templates/nsRDFConMemberTestNode.cpp
@@ -45,17 +45,17 @@ nsRDFConMemberTestNode::nsRDFConMemberTe
         nsAutoString cvar(NS_LITERAL_STRING("(none)"));
         if (mContainerVariable)
             mContainerVariable->ToString(cvar);
 
         nsAutoString mvar(NS_LITERAL_STRING("(none)"));
         if (mMemberVariable)
             mMemberVariable->ToString(mvar);
 
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("nsRDFConMemberTestNode[%p]: parent=%p member-props=(%s) container-var=%s member-var=%s",
                 this,
                 aParent,
                 props.get(),
                 NS_ConvertUTF16toUTF8(cvar).get(),
                 NS_ConvertUTF16toUTF8(mvar).get()));
     }
 }
@@ -115,17 +115,17 @@ nsRDFConMemberTestNode::FilterInstantiat
             const char* container = "(unbound)";
             if (hasContainerBinding)
                 containerRes->GetValueConst(&container);
 
             nsAutoString member(NS_LITERAL_STRING("(unbound)"));
             if (hasMemberBinding)
                 nsXULContentUtils::GetTextForNode(memberValue, member);
 
-            PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+            MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                    ("nsRDFConMemberTestNode[%p]: FilterInstantiations() container=[%s] member=[%s]",
                     this, container, NS_ConvertUTF16toUTF8(member).get()));
         }
 
         if (hasContainerBinding && hasMemberBinding) {
             // it's a consistency check. see if we have a assignment that is consistent
             bool isconsistent = false;
 
@@ -163,17 +163,17 @@ nsRDFConMemberTestNode::FilterInstantiat
                         // it's consistent. leave it in the set and we'll
                         // run it up to our parent.
                         isconsistent = true;
                         break;
                     }
                 }
             }
 
-            PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+            MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                    ("    consistency check => %s", isconsistent ? "passed" : "failed"));
 
             if (isconsistent) {
                 // Add a memory element to our set-of-support.
                 Element* element =
                     new nsRDFConMemberTestNode::Element(containerRes,
                                                         memberValue);
 
@@ -214,17 +214,17 @@ nsRDFConMemberTestNode::FilterInstantiat
                 nsCOMPtr<nsIRDFNode> node = do_QueryInterface(isupports);
                 if (! node)
                     return NS_ERROR_UNEXPECTED;
 
                 if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
                     nsAutoString member;
                     nsXULContentUtils::GetTextForNode(node, member);
 
-                    PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+                    MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                            ("    member => %s", NS_ConvertUTF16toUTF8(member).get()));
                 }
 
                 Instantiation newinst = *inst;
                 newinst.AddAssignment(mMemberVariable, node);
 
                 Element* element =
                     new nsRDFConMemberTestNode::Element(containerRes, node);
@@ -301,17 +301,17 @@ nsRDFConMemberTestNode::FilterInstantiat
                         nsCOMPtr<nsIRDFResource> source = do_QueryInterface(isupports);
                         if (! source)
                             return NS_ERROR_UNEXPECTED;
 
                         if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
                             const char* container;
                             source->GetValueConst(&container);
 
-                            PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+                            MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                                    ("    container => %s", container));
                         }
 
                         // Add a new instantiation
                         Instantiation newinst = *inst;
                         newinst.AddAssignment(mContainerVariable, source);
 
                         Element* element =
@@ -371,34 +371,34 @@ nsRDFConMemberTestNode::FilterInstantiat
                         value = do_QueryInterface(isupports);
                         NS_ASSERTION(value != nullptr, "member is not an nsIRDFNode");
                         if (! value) continue;
 
                         if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
                             nsAutoString s;
                             nsXULContentUtils::GetTextForNode(value, s);
 
-                            PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+                            MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                                    ("    member => %s", NS_ConvertUTF16toUTF8(s).get()));
                         }
                     }
                     else {
                         variable = mContainerVariable;
 
                         valueRes = do_QueryInterface(isupports);
                         NS_ASSERTION(valueRes != nullptr, "container is not an nsIRDFResource");
                         if (! valueRes) continue;
 
                         value = valueRes;
 
                         if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
                             const char* s;
                             valueRes->GetValueConst(&s);
 
-                            PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+                            MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                                    ("    container => %s", s));
                         }
                     }
 
                     // Copy the original instantiation, and add it to the
                     // instantiation set with the new assignment that we've
                     // introduced. Ownership will be transferred to the
                     Instantiation newinst = *inst;
@@ -471,17 +471,17 @@ nsRDFConMemberTestNode::CanPropagate(nsI
         aSource->GetValueConst(&source);
 
         const char* property;
         aProperty->GetValueConst(&property);
 
         nsAutoString target;
         nsXULContentUtils::GetTextForNode(aTarget, target);
 
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("nsRDFConMemberTestNode[%p]: CanPropagate([%s]==[%s]=>[%s]) => %s",
                 this, source, property, NS_ConvertUTF16toUTF8(target).get(),
                 canpropagate ? "true" : "false"));
     }
 
     if (canpropagate) {
         aInitialBindings.AddAssignment(mContainerVariable, aSource);
         aInitialBindings.AddAssignment(mMemberVariable, aTarget);
--- a/dom/xul/templates/nsRDFPropertyTestNode.cpp
+++ b/dom/xul/templates/nsRDFPropertyTestNode.cpp
@@ -32,17 +32,17 @@ nsRDFPropertyTestNode::nsRDFPropertyTest
         nsAutoString svar(NS_LITERAL_STRING("(none)"));
         if (mSourceVariable)
             mSourceVariable->ToString(svar);
 
         nsAutoString tvar(NS_LITERAL_STRING("(none)"));
         if (mTargetVariable)
             mTargetVariable->ToString(tvar);
 
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("nsRDFPropertyTestNode[%p]: parent=%p source=%s property=%s target=%s",
                 this, aParent, NS_ConvertUTF16toUTF8(svar).get(), prop, NS_ConvertUTF16toUTF8(tvar).get()));
     }
 }
 
 
 nsRDFPropertyTestNode::nsRDFPropertyTestNode(TestNode* aParent,
                                              nsXULTemplateQueryProcessorRDF* aProcessor,
@@ -65,17 +65,17 @@ nsRDFPropertyTestNode::nsRDFPropertyTest
         const char* prop = "(null)";
         if (aProperty)
             aProperty->GetValueConst(&prop);
 
         nsAutoString tvar(NS_LITERAL_STRING("(none)"));
         if (mTargetVariable)
             mTargetVariable->ToString(tvar);
 
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("nsRDFPropertyTestNode[%p]: parent=%p source=%s property=%s target=%s",
                 this, aParent, source, prop, NS_ConvertUTF16toUTF8(tvar).get()));
     }
 }
 
 
 nsRDFPropertyTestNode::nsRDFPropertyTestNode(TestNode* aParent,
                                              nsXULTemplateQueryProcessorRDF* aProcessor,
@@ -97,17 +97,17 @@ nsRDFPropertyTestNode::nsRDFPropertyTest
 
         const char* prop = "(null)";
         if (aProperty)
             aProperty->GetValueConst(&prop);
 
         nsAutoString target;
         nsXULContentUtils::GetTextForNode(aTarget, target);
 
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("nsRDFPropertyTestNode[%p]: parent=%p source=%s property=%s target=%s",
                 this, aParent, NS_ConvertUTF16toUTF8(svar).get(), prop, NS_ConvertUTF16toUTF8(target).get()));
     }
 }
 
 
 nsresult
 nsRDFPropertyTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
@@ -152,29 +152,29 @@ nsRDFPropertyTestNode::FilterInstantiati
             const char* source = "(unbound)";
             if (hasSourceBinding)
                 sourceRes->GetValueConst(&source);
 
             nsAutoString target(NS_LITERAL_STRING("(unbound)"));
             if (hasTargetBinding)
                 nsXULContentUtils::GetTextForNode(targetValue, target);
 
-            PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+            MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                    ("nsRDFPropertyTestNode[%p]: FilterInstantiations() source=[%s] target=[%s]",
                     this, source, NS_ConvertUTF16toUTF8(target).get()));
         }
 
         if (hasSourceBinding && hasTargetBinding) {
             // it's a consistency check. see if we have a assignment that is consistent
             bool hasAssertion;
             rv = ds->HasAssertion(sourceRes, mProperty, targetValue,
                                   true, &hasAssertion);
             if (NS_FAILED(rv)) return rv;
 
-            PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+            MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                    ("    consistency check => %s", hasAssertion ? "passed" : "failed"));
 
             if (hasAssertion) {
                 // it's consistent.
                 Element* element =
                     new nsRDFPropertyTestNode::Element(sourceRes, mProperty,
                                                        targetValue);
 
@@ -229,17 +229,17 @@ nsRDFPropertyTestNode::FilterInstantiati
                     value = do_QueryInterface(isupports);
                     NS_ASSERTION(value != nullptr, "target is not an nsIRDFNode");
 
                     if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
                         nsAutoString s(NS_LITERAL_STRING("(none found)"));
                         if (value)
                             nsXULContentUtils::GetTextForNode(value, s);
 
-                        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+                        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                                ("    target => %s", NS_ConvertUTF16toUTF8(s).get()));
                     }
 
                     if (! value) continue;
 
                     targetValue = value;
                 }
                 else {
@@ -248,17 +248,17 @@ nsRDFPropertyTestNode::FilterInstantiati
                     nsCOMPtr<nsIRDFResource> source = do_QueryInterface(isupports);
                     NS_ASSERTION(source != nullptr, "source is not an nsIRDFResource");
 
                     if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
                         const char* s = "(none found)";
                         if (source)
                             source->GetValueConst(&s);
 
-                        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+                        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                                ("    source => %s", s));
                     }
 
                     if (! source) continue;
 
                     value = sourceRes = source;
                 }
 
@@ -326,17 +326,17 @@ nsRDFPropertyTestNode::CanPropagate(nsIR
         aSource->GetValueConst(&source);
 
         const char* property;
         aProperty->GetValueConst(&property);
 
         nsAutoString target;
         nsXULContentUtils::GetTextForNode(aTarget, target);
 
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("nsRDFPropertyTestNode[%p]: CanPropagate([%s]==[%s]=>[%s]) => %s",
                 this, source, property, NS_ConvertUTF16toUTF8(target).get(),
                 result ? "true" : "false"));
     }
 
     return result;
 }
 
@@ -351,17 +351,17 @@ nsRDFPropertyTestNode::Retract(nsIRDFRes
             aSource->GetValueConst(&source);
 
             const char* property;
             aProperty->GetValueConst(&property);
 
             nsAutoString target;
             nsXULContentUtils::GetTextForNode(aTarget, target);
 
-            PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+            MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                    ("nsRDFPropertyTestNode[%p]: Retract([%s]==[%s]=>[%s])",
                     this, source, property, NS_ConvertUTF16toUTF8(target).get()));
         }
 
         mProcessor->RetractElement(Element(aSource, aProperty, aTarget));
     }
 }
 
--- a/dom/xul/templates/nsRuleNetwork.cpp
+++ b/dom/xul/templates/nsRuleNetwork.cpp
@@ -289,17 +289,17 @@ TestNode::TestNode(TestNode* aParent)
     : mParent(aParent)
 {
 }
 
 nsresult
 TestNode::Propagate(InstantiationSet& aInstantiations,
                     bool aIsUpdate, bool& aTakenInstantiations)
 {
-    PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+    MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
            ("TestNode[%p]: Propagate() begin", this));
 
     aTakenInstantiations = false;
 
     nsresult rv = FilterInstantiations(aInstantiations, nullptr);
     if (NS_FAILED(rv))
         return rv;
 
@@ -308,17 +308,17 @@ TestNode::Propagate(InstantiationSet& aI
     // case. If there is only one child, optimize and just pass the
     // instantiations along to the child without copying
     bool shouldCopy = (mKids.Count() > 1);
 
     // See the header file for details about how instantiation ownership works.
     if (! aInstantiations.Empty()) {
         ReteNodeSet::Iterator last = mKids.Last();
         for (ReteNodeSet::Iterator kid = mKids.First(); kid != last; ++kid) {
-            PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+            MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                    ("TestNode[%p]: Propagate() passing to child %p", this, kid.operator->()));
 
             // create a copy of the instantiations
             if (shouldCopy) {
                 bool owned = false;
                 InstantiationSet* instantiations =
                     new InstantiationSet(aInstantiations);
                 if (!instantiations)
@@ -332,61 +332,61 @@ TestNode::Propagate(InstantiationSet& aI
             else {
                 rv = kid->Propagate(aInstantiations, aIsUpdate, aTakenInstantiations);
                 if (NS_FAILED(rv))
                     return rv;
             }
         }
     }
 
-    PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+    MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
            ("TestNode[%p]: Propagate() end", this));
 
     return NS_OK;
 }
 
 
 nsresult
 TestNode::Constrain(InstantiationSet& aInstantiations)
 {
     nsresult rv;
 
-    PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+    MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
            ("TestNode[%p]: Constrain() begin", this));
 
     // if the cantHandleYet flag is set by FilterInstantiations,
     // there isn't enough information yet available to fill in.
     // For this, continue the constrain all the way to the top
     // and then call FilterInstantiations again afterwards. This
     // should fill in any missing information.
     bool cantHandleYet = false;
     rv = FilterInstantiations(aInstantiations, &cantHandleYet);
     if (NS_FAILED(rv)) return rv;
 
     if (mParent && (!aInstantiations.Empty() || cantHandleYet)) {
         // if we still have instantiations, or if the instantiations
         // could not be filled in yet, then ride 'em on up to the
         // parent to narrow them.
 
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("TestNode[%p]: Constrain() passing to parent %p", this, mParent));
 
         rv = mParent->Constrain(aInstantiations);
 
         if (NS_SUCCEEDED(rv) && cantHandleYet)
             rv = FilterInstantiations(aInstantiations, nullptr);
     }
     else {
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("TestNode[%p]: Constrain() failed", this));
 
         rv = NS_OK;
     }
 
-    PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+    MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
            ("TestNode[%p]: Constrain() end", this));
 
     return rv;
 }
 
 
 //----------------------------------------------------------------------
 
--- a/dom/xul/templates/nsXULContentBuilder.cpp
+++ b/dom/xul/templates/nsXULContentBuilder.cpp
@@ -442,24 +442,24 @@ nsXULContentBuilder::BuildContentFromTem
     // |aNewIndexInContainer| are used to determine where in the
     // content model new content is constructed. This allows a single
     // notification to be propagated to document observers.
     //
 
     nsresult rv;
 
     if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
-        PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
                ("nsXULContentBuilder::BuildContentFromTemplate (is unique: %d)",
                aIsUnique));
 
         nsAutoString id;
         aChild->GetId(id);
 
-        PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
                ("Tags: [Template: %s  Resource: %s  Real: %s] for id %s",
                 nsAtomCString(aTemplateNode->NodeInfo()->NameAtom()).get(),
                 nsAtomCString(aResourceNode->NodeInfo()->NameAtom()).get(),
                 nsAtomCString(aRealNode->NodeInfo()->NameAtom()).get(), NS_ConvertUTF16toUTF8(id).get()));
     }
 
     // Iterate through all of the template children, constructing
     // "real" content model nodes for each "template" child.
@@ -519,17 +519,17 @@ nsXULContentBuilder::BuildContentFromTem
             isUnique = false;
         }
 
         MOZ_ASSERT_IF(isGenerationElement, tmplKid->IsElement());
 
         nsIAtom *tag = tmplKid->NodeInfo()->NameAtom();
 
         if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
-            PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+            MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                    ("xultemplate[%p]     building %s %s %s",
                     this, nsAtomCString(tag).get(),
                     (isGenerationElement ? "[resource]" : ""),
                     (isUnique ? "[unique]" : "")));
         }
 
         // Set to true if the child we're trying to create now
         // already existed in the content model.
@@ -934,17 +934,17 @@ nsXULContentBuilder::RemoveMember(nsICon
 nsresult
 nsXULContentBuilder::CreateTemplateAndContainerContents(nsIContent* aElement,
                                                         bool aForceCreation)
 {
     // Generate both 1) the template content for the current element,
     // and 2) recursive subcontent (if the current element refers to a
     // container result).
 
-    PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
+    MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
            ("nsXULContentBuilder::CreateTemplateAndContainerContents start - flags: %d",
             mFlags));
 
     if (! mQueryProcessor)
         return NS_OK;
 
     // for the root element, get the ref attribute and generate content
     if (aElement == mRoot) {
@@ -970,17 +970,17 @@ nsXULContentBuilder::CreateTemplateAndCo
         // are given ids) and only those elements, so get the reference point
         // from the corresponding match.
         nsTemplateMatch *match = nullptr;
         if (mContentSupportMap.Get(aElement, &match))
             CreateContainerContents(aElement, match->mResult, aForceCreation,
                                     false, true);
     }
 
-    PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
+    MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
            ("nsXULContentBuilder::CreateTemplateAndContainerContents end"));
 
     return NS_OK;
 }
 
 nsresult
 nsXULContentBuilder::CreateContainerContents(nsIContent* aElement,
                                              nsIXULTemplateResult* aResult,
@@ -1071,17 +1071,17 @@ nsXULContentBuilder::CreateContainerCont
                                                         bool aNotify,
                                                         nsTemplateQuerySet* aQuerySet,
                                                         nsIContent** aContainer,
                                                         int32_t* aNewIndexInContainer)
 {
     if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
         nsAutoString id;
         aResult->GetId(id);
-        PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
                ("nsXULContentBuilder::CreateContainerContentsForQuerySet start for ref %s\n",
                NS_ConvertUTF16toUTF8(id).get()));
     }
 
     if (! mQueryProcessor)
         return NS_OK;
 
     nsCOMPtr<nsISimpleEnumerator> results;
--- a/dom/xul/templates/nsXULContentUtils.cpp
+++ b/dom/xul/templates/nsXULContentUtils.cpp
@@ -358,11 +358,11 @@ nsXULContentUtils::LogTemplateError(cons
 {
   nsAutoString message;
   message.AssignLiteral("Error parsing template: ");
   message.Append(NS_ConvertUTF8toUTF16(aStr).get());
 
   nsCOMPtr<nsIConsoleService> cs = do_GetService(NS_CONSOLESERVICE_CONTRACTID);
   if (cs) {
     cs->LogStringMessage(message.get());
-    PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS, ("Error parsing template: %s", aStr));
+    MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS, ("Error parsing template: %s", aStr));
   }
 }
--- a/dom/xul/templates/nsXULTemplateBuilder.cpp
+++ b/dom/xul/templates/nsXULTemplateBuilder.cpp
@@ -497,17 +497,17 @@ nsXULTemplateBuilder::ReplaceResult(nsIX
     return UpdateResult(nullptr, aNewResult, aQueryNode);
 }
 
 nsresult
 nsXULTemplateBuilder::UpdateResult(nsIXULTemplateResult* aOldResult,
                                    nsIXULTemplateResult* aNewResult,
                                    nsIDOMNode* aQueryNode)
 {
-    PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
+    MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
            ("nsXULTemplateBuilder::UpdateResult %p %p %p",
            aOldResult, aNewResult, aQueryNode));
 
     if (!mRoot || !mQueriesCompiled)
       return NS_OK;
 
     // get the containers where content may be inserted. If
     // GetInsertionLocations returns false, no container has generated
--- a/dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp
+++ b/dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp
@@ -487,17 +487,17 @@ nsXULTemplateQueryProcessorRDF::Generate
                 nsAutoString id;
                 aRef->GetId(id);
 
                 nsAutoString rvar;
                 query->mRefVariable->ToString(rvar);
                 nsAutoString mvar;
                 query->mMemberVariable->ToString(mvar);
 
-                PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
+                MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
                        ("QueryProcessor::GenerateResults using ref %s and vars [ ref: %s  member: %s]",
                        NS_ConvertUTF16toUTF8(id).get(),
                        NS_ConvertUTF16toUTF8(rvar).get(),
                        NS_ConvertUTF16toUTF8(mvar).get()));
             }
 
             if (root) {
                 // the seed is the initial instantiation, which has a single
@@ -866,17 +866,17 @@ nsXULTemplateQueryProcessorRDF::Propagat
     if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
         const char* sourceStr;
         aSource->GetValueConst(&sourceStr);
         const char* propertyStr;
         aProperty->GetValueConst(&propertyStr);
         nsAutoString targetStr;
         nsXULContentUtils::GetTextForNode(aTarget, targetStr);
 
-        PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
                ("nsXULTemplateQueryProcessorRDF::Propagate: [%s] -> [%s] -> [%s]\n",
                sourceStr, propertyStr, NS_ConvertUTF16toUTF8(targetStr).get()));
     }
 
     {
         ReteNodeSet::Iterator last = mRDFTests.Last();
         for (ReteNodeSet::Iterator i = mRDFTests.First(); i != last; ++i) {
             nsRDFTestNode* rdftestnode = static_cast<nsRDFTestNode*>(*i);
@@ -953,17 +953,17 @@ nsXULTemplateQueryProcessorRDF::Retract(
     if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
         const char* sourceStr;
         aSource->GetValueConst(&sourceStr);
         const char* propertyStr;
         aProperty->GetValueConst(&propertyStr);
         nsAutoString targetStr;
         nsXULContentUtils::GetTextForNode(aTarget, targetStr);
 
-        PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
                ("nsXULTemplateQueryProcessorRDF::Retract: [%s] -> [%s] -> [%s]\n",
                sourceStr, propertyStr, NS_ConvertUTF16toUTF8(targetStr).get()));
     }
 
     // Retract any currently active rules that will no longer be matched.
     ReteNodeSet::ConstIterator lastnode = mRDFTests.Last();
     for (ReteNodeSet::ConstIterator node = mRDFTests.First(); node != lastnode; ++node) {
         const nsRDFTestNode* rdftestnode = static_cast<const nsRDFTestNode*>(*node);
@@ -1026,32 +1026,32 @@ nsXULTemplateQueryProcessorRDF::Log(cons
     if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
         nsresult rv;
 
         const char* sourceStr;
         rv = aSource->GetValueConst(&sourceStr);
         if (NS_FAILED(rv))
             return rv;
 
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("xultemplate[%p] %8s [%s]--", this, aOperation, sourceStr));
 
         const char* propertyStr;
         rv = aProperty->GetValueConst(&propertyStr);
         if (NS_FAILED(rv))
             return rv;
 
         nsAutoString targetStr;
         rv = nsXULContentUtils::GetTextForNode(aTarget, targetStr);
         if (NS_FAILED(rv))
             return rv;
 
         nsAutoCString targetstrC;
         targetstrC.AssignWithConversion(targetStr);
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("                        --[%s]-->[%s]",
                 propertyStr,
                 targetstrC.get()));
     }
     return NS_OK;
 }
 
 nsresult
@@ -1270,17 +1270,17 @@ nsXULTemplateQueryProcessorRDF::CompileQ
         rv = CompileMemberCondition(aQuery, aCondition, aParentNode, aResult);
     }
     else if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_ALWAYS)) {
         nsAutoString tagstr;
         aTag->ToString(tagstr);
 
         nsAutoCString tagstrC;
         tagstrC.AssignWithConversion(tagstr);
-        PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
                ("xultemplate[%p] unrecognized condition test <%s>",
                 this, tagstrC.get()));
     }
 
     return rv;
 }
 
 nsresult
--- a/dom/xul/templates/nsXULTreeBuilder.cpp
+++ b/dom/xul/templates/nsXULTreeBuilder.cpp
@@ -1225,17 +1225,17 @@ nsXULTreeBuilder::SynchronizeResult(nsIX
         NS_ASSERTION(iter != mRows.Last(), "couldn't find row");
         if (iter == mRows.Last())
             return NS_ERROR_FAILURE;
 
         int32_t row = iter.GetRowIndex();
         if (row >= 0)
             mBoxObject->InvalidateRow(row);
 
-        PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
+        MOZ_LOG(gXULTemplateLog, PR_LOG_DEBUG,
                ("xultemplate[%p]   => row %d", this, row));
     }
 
     return NS_OK;
 }
 
 //----------------------------------------------------------------------
 
--- a/extensions/auth/nsAuth.h
+++ b/extensions/auth/nsAuth.h
@@ -17,11 +17,11 @@ enum pType {
 //
 // in order to do logging, the following environment variables need to be set:
 // 
 //      set NSPR_LOG_MODULES=negotiateauth:4
 //      set NSPR_LOG_FILE=negotiateauth.log
 //
 extern PRLogModuleInfo* gNegotiateLog;
 
-#define LOG(args) PR_LOG(gNegotiateLog, PR_LOG_DEBUG, args)
+#define LOG(args) MOZ_LOG(gNegotiateLog, PR_LOG_DEBUG, args)
 
 #endif /* !defined( nsAuth_h__ ) */
--- a/extensions/gio/nsGIOProtocolHandler.cpp
+++ b/extensions/gio/nsGIOProtocolHandler.cpp
@@ -24,17 +24,17 @@
 
 #define MOZ_GIO_SCHEME              "moz-gio"
 #define MOZ_GIO_SUPPORTED_PROTOCOLS "network.gio.supported-protocols"
 
 //-----------------------------------------------------------------------------
 
 // NSPR_LOG_MODULES=gio:5
 static PRLogModuleInfo *sGIOLog;
-#define LOG(args) PR_LOG(sGIOLog, PR_LOG_DEBUG, args)
+#define LOG(args) MOZ_LOG(sGIOLog, PR_LOG_DEBUG, args)
 
 
 //-----------------------------------------------------------------------------
 static nsresult
 MapGIOResult(gint code) 
 {
   switch (code)
   {
--- a/extensions/pref/autoconfig/src/nsAutoConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsAutoConfig.cpp
@@ -15,16 +15,18 @@
 #include "nsIPromptService.h"
 #include "nsIServiceManager.h"
 #include "nsIStringBundle.h"
 #include "nsContentUtils.h"
 #include "nsCRT.h"
 #include "nspr.h"
 #include <algorithm>
 
+#include "mozilla/Logging.h"
+
 PRLogModuleInfo *MCD;
 
 extern nsresult EvaluateAdminConfigScript(const char *js_buffer, size_t length,
                                           const char *filename, 
                                           bool bGlobalContext, 
                                           bool bCallbacks, 
                                           bool skipFirstLine);
 
@@ -115,28 +117,28 @@ nsAutoConfig::OnDataAvailable(nsIRequest
 NS_IMETHODIMP
 nsAutoConfig::OnStopRequest(nsIRequest *request, nsISupports *context,
                             nsresult aStatus)
 {
     nsresult rv;
 
     // If the request is failed, go read the failover.jsc file
     if (NS_FAILED(aStatus)) {
-        PR_LOG(MCD, PR_LOG_DEBUG, ("mcd request failed with status %x\n", aStatus));
+        MOZ_LOG(MCD, PR_LOG_DEBUG, ("mcd request failed with status %x\n", aStatus));
         return readOfflineFile();
     }
 
     // Checking for the http response, if failure go read the failover file.
     nsCOMPtr<nsIHttpChannel> pHTTPCon(do_QueryInterface(request));
     if (pHTTPCon) {
         uint32_t httpStatus;
         pHTTPCon->GetResponseStatus(&httpStatus);
         if (httpStatus != 200) 
         {
-            PR_LOG(MCD, PR_LOG_DEBUG, ("mcd http request failed with status %x\n", httpStatus));
+            MOZ_LOG(MCD, PR_LOG_DEBUG, ("mcd http request failed with status %x\n", httpStatus));
             return readOfflineFile();
         }
     }
     
     // Send the autoconfig.jsc to javascript engine.
     
     rv = EvaluateAdminConfigScript(mBuf.get(), mBuf.Length(),
                               nullptr, false,true, false);
@@ -191,17 +193,17 @@ NS_IMETHODIMP nsAutoConfig::Observe(nsIS
 nsresult nsAutoConfig::downloadAutoConfig()
 {
     nsresult rv;
     nsAutoCString emailAddr;
     nsXPIDLCString urlName;
     static bool firstTime = true;
     
     if (mConfigURL.IsEmpty()) {
-        PR_LOG(MCD, PR_LOG_DEBUG, ("global config url is empty - did you set autoadmin.global_config_url?\n"));
+        MOZ_LOG(MCD, PR_LOG_DEBUG, ("global config url is empty - did you set autoadmin.global_config_url?\n"));
         NS_WARNING("AutoConfig called without global_config_url");
         return NS_OK;
     }
     
     // If there is an email address appended as an argument to the ConfigURL
     // in the previous read, we need to remove it when timer kicks in and 
     // downloads the autoconfig file again. 
     // If necessary, the email address will be added again as an argument.
@@ -265,21 +267,21 @@ nsresult nsAutoConfig::downloadAutoConfi
     
     // create a new url 
     nsCOMPtr<nsIURI> url;
     nsCOMPtr<nsIChannel> channel;
     
     rv = NS_NewURI(getter_AddRefs(url), mConfigURL.get(), nullptr, nullptr);
     if (NS_FAILED(rv))
     {
-        PR_LOG(MCD, PR_LOG_DEBUG, ("failed to create URL - is autoadmin.global_config_url valid? - %s\n", mConfigURL.get()));
+        MOZ_LOG(MCD, PR_LOG_DEBUG, ("failed to create URL - is autoadmin.global_config_url valid? - %s\n", mConfigURL.get()));
         return rv;
     }
 
-    PR_LOG(MCD, PR_LOG_DEBUG, ("running MCD url %s\n", mConfigURL.get()));
+    MOZ_LOG(MCD, PR_LOG_DEBUG, ("running MCD url %s\n", mConfigURL.get()));
     // open a channel for the url
     rv = NS_NewChannel(getter_AddRefs(channel),
                        url,
                        nsContentUtils::GetSystemPrincipal(),
                        nsILoadInfo::SEC_NORMAL,
                        nsIContentPolicy::TYPE_OTHER,
                        nullptr,  // loadGroup
                        nullptr,  // aCallbacks
--- a/extensions/pref/autoconfig/src/nsReadConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsReadConfig.cpp
@@ -135,17 +135,17 @@ nsresult nsReadConfig::readConfigFile()
         
     // This preference is set in the all.js or all-ns.js (depending whether 
     // running mozilla or netscp6)
 
     rv = defaultPrefBranch->GetCharPref("general.config.filename", 
                                   getter_Copies(lockFileName));
 
 
-    PR_LOG(MCD, PR_LOG_DEBUG, ("general.config.filename = %s\n", lockFileName.get()));
+    MOZ_LOG(MCD, PR_LOG_DEBUG, ("general.config.filename = %s\n", lockFileName.get()));
     if (NS_FAILED(rv))
         return rv;
 
     // This needs to be read only once.
     //
     if (!mRead) {
         // Initiate the new JS Context for Preference management
         
@@ -169,21 +169,21 @@ nsresult nsReadConfig::readConfigFile()
     // of the cfg file meaning the file can not be renamed (successfully).
 
     nsCOMPtr<nsIPrefBranch> prefBranch;
     rv = prefService->GetBranch(nullptr, getter_AddRefs(prefBranch));
     NS_ENSURE_SUCCESS(rv, rv);
 
     int32_t obscureValue = 0;
     (void) defaultPrefBranch->GetIntPref("general.config.obscure_value", &obscureValue);
-    PR_LOG(MCD, PR_LOG_DEBUG, ("evaluating .cfg file %s with obscureValue %d\n", lockFileName.get(), obscureValue));
+    MOZ_LOG(MCD, PR_LOG_DEBUG, ("evaluating .cfg file %s with obscureValue %d\n", lockFileName.get(), obscureValue));
     rv = openAndEvaluateJSFile(lockFileName.get(), obscureValue, true, true);
     if (NS_FAILED(rv))
     {
-      PR_LOG(MCD, PR_LOG_DEBUG, ("error evaluating .cfg file %s %x\n", lockFileName.get(), rv));
+      MOZ_LOG(MCD, PR_LOG_DEBUG, ("error evaluating .cfg file %s %x\n", lockFileName.get(), rv));
       return rv;
     }
     
     rv = prefBranch->GetCharPref("general.config.filename", 
                                   getter_Copies(lockFileName));
     if (NS_FAILED(rv))
         // There is NO REASON we should ever get here. This is POST reading 
         // of the config file.
--- a/gfx/layers/LayersTypes.h
+++ b/gfx/layers/LayersTypes.h
@@ -16,19 +16,19 @@
 #include <ui/GraphicBuffer.h>
 #endif
 #include <stdio.h>            // FILE
 #include "mozilla/Logging.h"            // for PR_LOG
 #ifndef MOZ_LAYERS_HAVE_LOG
 #  define MOZ_LAYERS_HAVE_LOG
 #endif
 #define MOZ_LAYERS_LOG(_args)                             \
-  PR_LOG(LayerManager::GetLog(), PR_LOG_DEBUG, _args)
+  MOZ_LOG(LayerManager::GetLog(), PR_LOG_DEBUG, _args)
 #define MOZ_LAYERS_LOG_IF_SHADOWABLE(layer, _args)         \
-  do { if (layer->AsShadowableLayer()) { PR_LOG(LayerManager::GetLog(), PR_LOG_DEBUG, _args); } } while (0)
+  do { if (layer->AsShadowableLayer()) { MOZ_LOG(LayerManager::GetLog(), PR_LOG_DEBUG, _args); } } while (0)
 
 #define INVALID_OVERLAY -1
 
 namespace android {
 class GraphicBuffer;
 }
 
 namespace mozilla {
--- a/gfx/thebes/gfxDWriteFontList.cpp
+++ b/gfx/thebes/gfxDWriteFontList.cpp
@@ -22,23 +22,23 @@
 #include "gfxGDIFontList.h"
 
 #include "nsIWindowsRegKey.h"
 
 #include "harfbuzz/hb.h"
 
 using namespace mozilla;
 
-#define LOG_FONTLIST(args) PR_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
+#define LOG_FONTLIST(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
                                PR_LOG_DEBUG, args)
 #define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
                                    gfxPlatform::GetLog(eGfxLog_fontlist), \
                                    PR_LOG_DEBUG)
 
-#define LOG_FONTINIT(args) PR_LOG(gfxPlatform::GetLog(eGfxLog_fontinit), \
+#define LOG_FONTINIT(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontinit), \
                                PR_LOG_DEBUG, args)
 #define LOG_FONTINIT_ENABLED() PR_LOG_TEST( \
                                    gfxPlatform::GetLog(eGfxLog_fontinit), \
                                    PR_LOG_DEBUG)
 
 #define LOG_CMAPDATA_ENABLED() PR_LOG_TEST( \
                                    gfxPlatform::GetLog(eGfxLog_cmapdata), \
                                    PR_LOG_DEBUG)
--- a/gfx/thebes/gfxFT2FontList.cpp
+++ b/gfx/thebes/gfxFT2FontList.cpp
@@ -55,17 +55,17 @@ GetFontInfoLog()
 {
     static PRLogModuleInfo *sLog;
     if (!sLog)
         sLog = PR_NewLogModule("fontInfoLog");
     return sLog;
 }
 
 #undef LOG
-#define LOG(args) PR_LOG(GetFontInfoLog(), PR_LOG_DEBUG, args)
+#define LOG(args) MOZ_LOG(GetFontInfoLog(), PR_LOG_DEBUG, args)
 #define LOG_ENABLED() PR_LOG_TEST(GetFontInfoLog(), PR_LOG_DEBUG)
 
 static cairo_user_data_key_t sFTUserFontDataKey;
 
 static __inline void
 BuildKeyNameFromFontName(nsAString &aName)
 {
     ToLowerCase(aName);
--- a/gfx/thebes/gfxFcPlatformFontList.cpp
+++ b/gfx/thebes/gfxFcPlatformFontList.cpp
@@ -31,17 +31,17 @@ using namespace mozilla;
 using namespace mozilla::unicode;
 
 #ifndef FC_POSTSCRIPT_NAME
 #define FC_POSTSCRIPT_NAME  "postscriptname"      /* String */
 #endif
 
 #define PRINTING_FC_PROPERTY "gfx.printing"
 
-#define LOG_FONTLIST(args) PR_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
+#define LOG_FONTLIST(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
                                PR_LOG_DEBUG, args)
 #define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
                                    gfxPlatform::GetLog(eGfxLog_fontlist), \
                                    PR_LOG_DEBUG)
 #define LOG_CMAPDATA_ENABLED() PR_LOG_TEST( \
                                    gfxPlatform::GetLog(eGfxLog_cmapdata), \
                                    PR_LOG_DEBUG)
 
--- a/gfx/thebes/gfxFont.cpp
+++ b/gfx/thebes/gfxFont.cpp
@@ -67,17 +67,17 @@ uint32_t gFontCount = 0;
 uint32_t gGlyphExtentsCount = 0;
 uint32_t gGlyphExtentsWidthsTotalSize = 0;
 uint32_t gGlyphExtentsSetupEagerSimple = 0;
 uint32_t gGlyphExtentsSetupEagerTight = 0;
 uint32_t gGlyphExtentsSetupLazyTight = 0;
 uint32_t gGlyphExtentsSetupFallBackToTight = 0;
 #endif
 
-#define LOG_FONTINIT(args) PR_LOG(gfxPlatform::GetLog(eGfxLog_fontinit), \
+#define LOG_FONTINIT(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontinit), \
                                   PR_LOG_DEBUG, args)
 #define LOG_FONTINIT_ENABLED() PR_LOG_TEST( \
                                         gfxPlatform::GetLog(eGfxLog_fontinit), \
                                         PR_LOG_DEBUG)
 
 
 /*
  * gfxFontCache - global cache of gfxFont instances.
--- a/gfx/thebes/gfxFontEntry.cpp
+++ b/gfx/thebes/gfxFontEntry.cpp
@@ -1477,17 +1477,17 @@ gfxFontFamily::FindFontForChar(GlobalFon
             rank += RANK_MATCHED_CMAP;
             aMatchData->mCount++;
 
             PRLogModuleInfo *log = gfxPlatform::GetLog(eGfxLog_textrun);
 
             if (MOZ_UNLIKELY(PR_LOG_TEST(log, PR_LOG_DEBUG))) {
                 uint32_t unicodeRange = FindCharUnicodeRange(aMatchData->mCh);
                 uint32_t script = GetScriptCode(aMatchData->mCh);
-                PR_LOG(log, PR_LOG_DEBUG,\
+                MOZ_LOG(log, PR_LOG_DEBUG,\
                        ("(textrun-systemfallback-fonts) char: u+%6.6x "
                         "unicode-range: %d script: %d match: [%s]\n",
                         aMatchData->mCh,
                         unicodeRange, script,
                         NS_ConvertUTF16toUTF8(fe->Name()).get()));
             }
         }
 
--- a/gfx/thebes/gfxFontUtils.cpp
+++ b/gfx/thebes/gfxFontUtils.cpp
@@ -20,17 +20,17 @@
 #include "nsIUUIDGenerator.h"
 #include "nsIUnicodeDecoder.h"
 
 #include "harfbuzz/hb.h"
 
 #include "plbase64.h"
 #include "mozilla/Logging.h"
 
-#define LOG(log, args) PR_LOG(gfxPlatform::GetLog(log), \
+#define LOG(log, args) MOZ_LOG(gfxPlatform::GetLog(log), \
                                PR_LOG_DEBUG, args)
 
 #define UNICODE_BMP_LIMIT 0x10000
 
 using namespace mozilla;
 
 #pragma pack(1)
 
--- a/gfx/thebes/gfxGDIFontList.cpp
+++ b/gfx/thebes/gfxGDIFontList.cpp
@@ -35,17 +35,17 @@ using namespace mozilla;
 
 #define ROUND(x) floor((x) + 0.5)
 
 
 #ifndef CLEARTYPE_QUALITY
 #define CLEARTYPE_QUALITY 5
 #endif
 
-#define LOG_FONTLIST(args) PR_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
+#define LOG_FONTLIST(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
                                PR_LOG_DEBUG, args)
 #define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
                                    gfxPlatform::GetLog(eGfxLog_fontlist), \
                                    PR_LOG_DEBUG)
 
 #define LOG_CMAPDATA_ENABLED() PR_LOG_TEST( \
                                    gfxPlatform::GetLog(eGfxLog_cmapdata), \
                                    PR_LOG_DEBUG)
--- a/gfx/thebes/gfxMacPlatformFontList.mm
+++ b/gfx/thebes/gfxMacPlatformFontList.mm
@@ -124,17 +124,17 @@ static void GetStringForNSString(const N
 }
 
 static NSString* GetNSStringForString(const nsAString& aSrc)
 {
     return [NSString stringWithCharacters:reinterpret_cast<const unichar*>(aSrc.BeginReading())
                                    length:aSrc.Length()];
 }
 
-#define LOG_FONTLIST(args) PR_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
+#define LOG_FONTLIST(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
                                PR_LOG_DEBUG, args)
 #define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
                                    gfxPlatform::GetLog(eGfxLog_fontlist), \
                                    PR_LOG_DEBUG)
 #define LOG_CMAPDATA_ENABLED() PR_LOG_TEST( \
                                    gfxPlatform::GetLog(eGfxLog_cmapdata), \
                                    PR_LOG_DEBUG)
 
--- a/gfx/thebes/gfxPlatformFontList.cpp
+++ b/gfx/thebes/gfxPlatformFontList.cpp
@@ -18,22 +18,22 @@
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/gfx/2D.h"
 
 using namespace mozilla;
 
-#define LOG_FONTLIST(args) PR_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
+#define LOG_FONTLIST(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \
                                PR_LOG_DEBUG, args)
 #define LOG_FONTLIST_ENABLED() PR_LOG_TEST( \
                                    gfxPlatform::GetLog(eGfxLog_fontlist), \
                                    PR_LOG_DEBUG)
-#define LOG_FONTINIT(args) PR_LOG(gfxPlatform::GetLog(eGfxLog_fontinit), \
+#define LOG_FONTINIT(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontinit), \
                                PR_LOG_DEBUG, args)
 #define LOG_FONTINIT_ENABLED() PR_LOG_TEST( \
                                    gfxPlatform::GetLog(eGfxLog_fontinit), \
                                    PR_LOG_DEBUG)
 
 gfxPlatformFontList *gfxPlatformFontList::sPlatformFontList = nullptr;
 
 // Character ranges that require complex-script shaping support in the font,
@@ -578,17 +578,17 @@ gfxPlatformFontList::SystemFindFontForCh
     }
     TimeDuration elapsed = TimeStamp::Now() - start;
 
     PRLogModuleInfo *log = gfxPlatform::GetLog(eGfxLog_textrun);
 
     if (MOZ_UNLIKELY(PR_LOG_TEST(log, PR_LOG_WARNING))) {
         uint32_t unicodeRange = FindCharUnicodeRange(aCh);
         int32_t script = mozilla::unicode::GetScriptCode(aCh);
-        PR_LOG(log, PR_LOG_WARNING,\
+        MOZ_LOG(log, PR_LOG_WARNING,\
                ("(textrun-systemfallback-%s) char: u+%6.6x "
                  "unicode-range: %d script: %d match: [%s]"
                 " time: %dus cmaps: %d\n",
                 (common ? "common" : "global"), aCh,
                  unicodeRange, script,
                 (fontEntry ? NS_ConvertUTF16toUTF8(fontEntry->Name()).get() :
                     "<none>"),
                 int32_t(elapsed.ToMicroseconds()),
--- a/gfx/thebes/gfxTextRun.cpp
+++ b/gfx/thebes/gfxTextRun.cpp
@@ -2223,17 +2223,17 @@ gfxFontGroup::InitTextRun(gfxContext *aC
         if (sizeof(T) == sizeof(uint8_t) && !transformedString) {
 
             if (MOZ_UNLIKELY(PR_LOG_TEST(log, PR_LOG_WARNING))) {
                 nsAutoCString lang;
                 mStyle.language->ToUTF8String(lang);
                 nsAutoString families;
                 mFamilyList.ToString(families);
                 nsAutoCString str((const char*)aString, aLength);
-                PR_LOG(log, PR_LOG_WARNING,\
+                MOZ_LOG(log, PR_LOG_WARNING,\
                        ("(%s) fontgroup: [%s] default: %s lang: %s script: %d "
                         "len %d weight: %d width: %d style: %s size: %6.2f %d-byte "
                         "TEXTRUN [%s] ENDTEXTRUN\n",
                         (mStyle.systemFont ? "textrunui" : "textrun"),
                         NS_ConvertUTF16toUTF8(families).get(),
                         (mFamilyList.GetDefaultFontType() == eFamily_serif ?
                          "serif" :
                          (mFamilyList.GetDefaultFontType() == eFamily_sans_serif ?
@@ -2271,17 +2271,17 @@ gfxFontGroup::InitTextRun(gfxContext *aC
             while (scriptRuns.Next(runStart, runLimit, runScript)) {
 
                 if (MOZ_UNLIKELY(PR_LOG_TEST(log, PR_LOG_WARNING))) {
                     nsAutoCString lang;
                     mStyle.language->ToUTF8String(lang);
                     nsAutoString families;
                     mFamilyList.ToString(families);
                     uint32_t runLen = runLimit - runStart;
-                    PR_LOG(log, PR_LOG_WARNING,\
+                    MOZ_LOG(log, PR_LOG_WARNING,\
                            ("(%s) fontgroup: [%s] default: %s lang: %s script: %d "
                             "len %d weight: %d width: %d style: %s size: %6.2f "
                             "%d-byte TEXTRUN [%s] ENDTEXTRUN\n",
                             (mStyle.systemFont ? "textrunui" : "textrun"),
                             NS_ConvertUTF16toUTF8(families).get(),
                             (mFamilyList.GetDefaultFontType() == eFamily_serif ?
                              "serif" :
                              (mFamilyList.GetDefaultFontType() == eFamily_sans_serif ?
--- a/gfx/thebes/gfxUserFontSet.cpp
+++ b/gfx/thebes/gfxUserFontSet.cpp
@@ -28,17 +28,17 @@ PRLogModuleInfo*
 gfxUserFontSet::GetUserFontsLog()
 {
     static PRLogModuleInfo* sLog;
     if (!sLog)
         sLog = PR_NewLogModule("userfonts");
     return sLog;
 }
 
-#define LOG(args) PR_LOG(gfxUserFontSet::GetUserFontsLog(), PR_LOG_DEBUG, args)
+#define LOG(args) MOZ_LOG(gfxUserFontSet::GetUserFontsLog(), PR_LOG_DEBUG, args)
 #define LOG_ENABLED() PR_LOG_TEST(gfxUserFontSet::GetUserFontsLog(), PR_LOG_DEBUG)
 
 static uint64_t sFontSetGeneration = 0;
 
 // Based on ots::ExpandingMemoryStream from ots-memory-stream.h,
 // adapted to use Mozilla allocators and to allow the final
 // memory buffer to be adopted by the client.
 class ExpandingMemoryStream : public ots::OTSStream {
--- a/hal/HalLog.h
+++ b/hal/HalLog.h
@@ -17,17 +17,17 @@
  */
 
 namespace mozilla {
 
 namespace hal {
 
 extern PRLogModuleInfo *GetHalLog();
 #define HAL_LOG(...) \
-  PR_LOG(mozilla::hal::GetHalLog(), PR_LOG_DEBUG, (__VA_ARGS__))
+  MOZ_LOG(mozilla::hal::GetHalLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 #define HAL_ERR(...) \
-  PR_LOG(mozilla::hal::GetHalLog(), PR_LOG_ERROR, (__VA_ARGS__))
+  MOZ_LOG(mozilla::hal::GetHalLog(), PR_LOG_ERROR, (__VA_ARGS__))
 
 } // namespace hal
 
 } // namespace mozilla
 
 #endif // mozilla_HalLog_h
--- a/image/ImageLogging.h
+++ b/image/ImageLogging.h
@@ -19,122 +19,122 @@ extern PRLogModuleInfo* GetImgLog();
 class LogScope {
 public:
 
   LogScope(PRLogModuleInfo* aLog, void* aFrom, const char* aFunc)
     : mLog(aLog)
     , mFrom(aFrom)
     , mFunc(aFunc)
   {
-    PR_LOG(mLog, PR_LOG_DEBUG, ("%d [this=%p] %s {ENTER}\n",
+    MOZ_LOG(mLog, PR_LOG_DEBUG, ("%d [this=%p] %s {ENTER}\n",
                                 GIVE_ME_MS_NOW(), mFrom, mFunc));
   }
 
   /* const char * constructor */
   LogScope(PRLogModuleInfo* aLog, void* from, const char* fn,
            const char* paramName, const char* paramValue)
     : mLog(aLog)
     , mFrom(from)
     , mFunc(fn)
   {
-    PR_LOG(mLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=\"%s\") {ENTER}\n",
+    MOZ_LOG(mLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=\"%s\") {ENTER}\n",
                                  GIVE_ME_MS_NOW(), mFrom, mFunc,
                                  paramName, paramValue));
   }
 
   /* void ptr constructor */
   LogScope(PRLogModuleInfo* aLog, void* from, const char* fn,
            const char* paramName, const void* paramValue)
     : mLog(aLog)
     , mFrom(from)
     , mFunc(fn)
   {
-    PR_LOG(mLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=%p) {ENTER}\n",
+    MOZ_LOG(mLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=%p) {ENTER}\n",
                                 GIVE_ME_MS_NOW(), mFrom, mFunc,
                                 paramName, paramValue));
   }
 
   /* int32_t constructor */
   LogScope(PRLogModuleInfo* aLog, void* from, const char* fn,
            const char* paramName, int32_t paramValue)
     : mLog(aLog)
     , mFrom(from)
     , mFunc(fn)
   {
-    PR_LOG(mLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=\"%d\") {ENTER}\n",
+    MOZ_LOG(mLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=\"%d\") {ENTER}\n",
                                 GIVE_ME_MS_NOW(), mFrom, mFunc,
                                 paramName, paramValue));
   }
 
   /* uint32_t constructor */
   LogScope(PRLogModuleInfo* aLog, void* from, const char* fn,
            const char* paramName, uint32_t paramValue)
     : mLog(aLog)
     , mFrom(from)
     , mFunc(fn)
   {
-    PR_LOG(mLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=\"%d\") {ENTER}\n",
+    MOZ_LOG(mLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=\"%d\") {ENTER}\n",
                                 GIVE_ME_MS_NOW(), mFrom, mFunc,
                                 paramName, paramValue));
   }
 
   ~LogScope()
   {
-    PR_LOG(mLog, PR_LOG_DEBUG, ("%d [this=%p] %s {EXIT}\n",
+    MOZ_LOG(mLog, PR_LOG_DEBUG, ("%d [this=%p] %s {EXIT}\n",
                                 GIVE_ME_MS_NOW(), mFrom, mFunc));
   }
 
 private:
   PRLogModuleInfo* mLog;
   void* mFrom;
   const char* mFunc;
 };
 
 class LogFunc {
 public:
   LogFunc(PRLogModuleInfo* aLog, void* from, const char* fn)
   {
-    PR_LOG(aLog, PR_LOG_DEBUG, ("%d [this=%p] %s\n",
+    MOZ_LOG(aLog, PR_LOG_DEBUG, ("%d [this=%p] %s\n",
                                 GIVE_ME_MS_NOW(), from, fn));
   }
 
   LogFunc(PRLogModuleInfo* aLog, void* from, const char* fn,
           const char* paramName, const char* paramValue)
   {
-    PR_LOG(aLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=\"%s\")\n",
+    MOZ_LOG(aLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=\"%s\")\n",
                                 GIVE_ME_MS_NOW(), from, fn,
                                 paramName, paramValue));
   }
 
   LogFunc(PRLogModuleInfo* aLog, void* from, const char* fn,
           const char* paramName, const void* paramValue)
   {
-    PR_LOG(aLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=\"%p\")\n",
+    MOZ_LOG(aLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=\"%p\")\n",
                                 GIVE_ME_MS_NOW(), from, fn,
                                 paramName, paramValue));
   }
 
 
   LogFunc(PRLogModuleInfo* aLog, void* from, const char* fn,
           const char* paramName, uint32_t paramValue)
   {
-    PR_LOG(aLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=\"%d\")\n",
+    MOZ_LOG(aLog, PR_LOG_DEBUG, ("%d [this=%p] %s (%s=\"%d\")\n",
                                 GIVE_ME_MS_NOW(), from, fn,
                                 paramName, paramValue));
   }
 
 };
 
 
 class LogMessage {
 public:
   LogMessage(PRLogModuleInfo* aLog, void* from, const char* fn,
              const char* msg)
   {
-    PR_LOG(aLog, PR_LOG_DEBUG, ("%d [this=%p] %s -- %s\n",
+    MOZ_LOG(aLog, PR_LOG_DEBUG, ("%d [this=%p] %s -- %s\n",
                                 GIVE_ME_MS_NOW(), from, fn, msg));
   }
 };
 
 #define LOG_SCOPE_APPEND_LINE_NUMBER_PASTE(id, line) id ## line
 #define LOG_SCOPE_APPEND_LINE_NUMBER_EXPAND(id, line) \
         LOG_SCOPE_APPEND_LINE_NUMBER_PASTE(id, line)
 #define LOG_SCOPE_APPEND_LINE_NUMBER(id) \
--- a/image/decoders/nsBMPDecoder.cpp
+++ b/image/decoders/nsBMPDecoder.cpp
@@ -331,17 +331,17 @@ nsBMPDecoder::WriteInternal(const char* 
 
   // mProcessedHeader is checked to ensure that if at this point mPos == mLOH
   // but we have no data left to process, the next time WriteInternal is called
   // we won't enter this condition again.
   if (mPos == mLOH && !mProcessedHeader) {
       mProcessedHeader = true;
 
       ProcessInfoHeader();
-      PR_LOG(GetBMPLog(), PR_LOG_DEBUG,
+      MOZ_LOG(GetBMPLog(), PR_LOG_DEBUG,
              ("BMP is %lix%lix%lu. compression=%lu\n",
              mBIH.width, mBIH.height, mBIH.bpp, mBIH.compression));
       // Verify we support this bit depth
       if (mBIH.bpp != 1 && mBIH.bpp != 4 && mBIH.bpp != 8 &&
           mBIH.bpp != 16 && mBIH.bpp != 24 && mBIH.bpp != 32) {
         PostDataError();
         return;
       }
@@ -400,30 +400,30 @@ nsBMPDecoder::WriteInternal(const char* 
           mBIH.compression != BI_RLE4 && mBIH.compression != BI_BITFIELDS) {
         PostDataError();
         return;
       }
 
       // If we have RLE4 or RLE8 or BI_ALPHABITFIELDS, then ensure we
       // have valid BPP values before adding the frame
       if (mBIH.compression == BI_RLE8 && mBIH.bpp != 8) {
-        PR_LOG(GetBMPLog(), PR_LOG_DEBUG,
+        MOZ_LOG(GetBMPLog(), PR_LOG_DEBUG,
                ("BMP RLE8 compression only supports 8 bits per pixel\n"));
         PostDataError();
         return;
       }
       if (mBIH.compression == BI_RLE4 && mBIH.bpp != 4 && mBIH.bpp != 1) {
-        PR_LOG(GetBMPLog(), PR_LOG_DEBUG,
+        MOZ_LOG(GetBMPLog(), PR_LOG_DEBUG,
                ("BMP RLE4 compression only supports 4 bits per pixel\n"));
         PostDataError();
         return;
       }
       if (mBIH.compression == BI_ALPHABITFIELDS &&
           mBIH.bpp != 16 && mBIH.bpp != 32) {
-        PR_LOG(GetBMPLog(), PR_LOG_DEBUG,
+        MOZ_LOG(GetBMPLog(), PR_LOG_DEBUG,
                ("BMP ALPHABITFIELDS only supports 16 or 32 bits per pixel\n"
                 ));
         PostDataError();
         return;
       }
 
       if (mBIH.compression != BI_RLE8 && mBIH.compression != BI_RLE4 &&
           mBIH.compression != BI_ALPHABITFIELDS) {
@@ -685,17 +685,17 @@ nsBMPDecoder::WriteInternal(const char* 
           mRowBytes = 0;
         }
       } while (aCount > 0);
     } else if ((mBIH.compression == BI_RLE8) ||
              (mBIH.compression == BI_RLE4)) {
       if (((mBIH.compression == BI_RLE8) && (mBIH.bpp != 8)) ||
           ((mBIH.compression == BI_RLE4) && (mBIH.bpp != 4) &&
            (mBIH.bpp != 1))) {
-        PR_LOG(GetBMPLog(), PR_LOG_DEBUG,
+        MOZ_LOG(GetBMPLog(), PR_LOG_DEBUG,
                ("BMP RLE8/RLE4 compression only supports 8/4 bits per"
                " pixel\n"));
         PostDataError();
         return;
       }
 
       while (aCount > 0) {
         uint8_t byte;
--- a/image/decoders/nsJPEGDecoder.cpp
+++ b/image/decoders/nsJPEGDecoder.cpp
@@ -100,17 +100,17 @@ nsJPEGDecoder::nsJPEGDecoder(RasterImage
   mBackBuffer = nullptr;
   mBackBufferLen = mBackBufferSize = mBackBufferUnreadLen = 0;
 
   mInProfile = nullptr;
   mTransform = nullptr;
 
   mCMSMode = 0;
 
-  PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+  MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
          ("nsJPEGDecoder::nsJPEGDecoder: Creating JPEG decoder %p",
           this));
 }
 
 nsJPEGDecoder::~nsJPEGDecoder()
 {
   // Step 8: Release JPEG decompression object
   mInfo.src = nullptr;
@@ -119,17 +119,17 @@ nsJPEGDecoder::~nsJPEGDecoder()
   PR_FREEIF(mBackBuffer);
   if (mTransform) {
     qcms_transform_release(mTransform);
   }
   if (mInProfile) {
     qcms_profile_release(mInProfile);
   }
 
-  PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+  MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
          ("nsJPEGDecoder::~nsJPEGDecoder: Destroying JPEG decoder %p",
           this));
 }
 
 Telemetry::ID
 nsJPEGDecoder::SpeedHistogram()
 {
   return Telemetry::IMAGE_DECODE_SPEED_JPEG;
@@ -213,42 +213,42 @@ nsJPEGDecoder::WriteInternal(const char*
   // This cast to nsresult makes sense because setjmp() returns whatever we
   // passed to longjmp(), which was actually an nsresult.
   if ((error_code = (nsresult)setjmp(mErr.setjmp_buffer)) != NS_OK) {
     if (error_code == NS_ERROR_FAILURE) {
       PostDataError();
       // Error due to corrupt stream - return NS_OK and consume silently
       // so that ImageLib doesn't throw away a partial image load
       mState = JPEG_SINK_NON_JPEG_TRAILER;
-      PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+      MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
              ("} (setjmp returned NS_ERROR_FAILURE)"));
       return;
     } else {
       // Error due to reasons external to the stream (probably out of
       // memory) - let ImageLib attempt to clean up, even though
       // mozilla is seconds away from falling flat on its face.
       PostDecoderError(error_code);
       mState = JPEG_ERROR;
-      PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+      MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
              ("} (setjmp returned an error)"));
       return;
     }
   }
 
-  PR_LOG(GetJPEGLog(), PR_LOG_DEBUG,
+  MOZ_LOG(GetJPEGLog(), PR_LOG_DEBUG,
          ("[this=%p] nsJPEGDecoder::Write -- processing JPEG data\n", this));
 
   switch (mState) {
     case JPEG_HEADER: {
       LOG_SCOPE(GetJPEGLog(), "nsJPEGDecoder::Write -- entering JPEG_HEADER"
                 " case");
 
       // Step 3: read file parameters with jpeg_read_header()
       if (jpeg_read_header(&mInfo, TRUE) == JPEG_SUSPENDED) {
-        PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+        MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
                ("} (JPEG_SUSPENDED)"));
         return; // I/O suspension
       }
 
       int sampleSize = mImage->GetRequestedSampleSize();
       if (sampleSize > 0) {
         mInfo.scale_num = 1;
         mInfo.scale_denom = sampleSize;
@@ -304,34 +304,34 @@ nsJPEGDecoder::WriteInternal(const char*
         case JCS_CMYK:
         case JCS_YCCK:
             // qcms doesn't support cmyk
             mismatch = true;
           break;
         default:
           mState = JPEG_ERROR;
           PostDataError();
-          PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+          MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
                  ("} (unknown colorpsace (1))"));
           return;
       }
 
       if (!mismatch) {
         qcms_data_type type;
         switch (mInfo.out_color_space) {
           case JCS_GRAYSCALE:
             type = QCMS_DATA_GRAY_8;
             break;
           case JCS_RGB:
             type = QCMS_DATA_RGB_8;
             break;
           default:
             mState = JPEG_ERROR;
             PostDataError();
-            PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+            MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
                    ("} (unknown colorpsace (2))"));
             return;
         }
 #if 0
         // We don't currently support CMYK profiles. The following
         // code dealt with lcms types. Add something like this
         // back when we gain support for CMYK.
 
@@ -380,46 +380,46 @@ nsJPEGDecoder::WriteInternal(const char*
         case JCS_CMYK:
         case JCS_YCCK:
           // libjpeg can convert from YCCK to CMYK, but not to RGB
           mInfo.out_color_space = JCS_CMYK;
           break;
         default:
           mState = JPEG_ERROR;
           PostDataError();
-          PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+          MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
                  ("} (unknown colorpsace (3))"));
           return;
       }
     }
 
     // Don't allocate a giant and superfluous memory buffer
     // when not doing a progressive decode.
     mInfo.buffered_image = mDecodeStyle == PROGRESSIVE &&
                            jpeg_has_multiple_scans(&mInfo);
 
     if (!mImageData) {
       mState = JPEG_ERROR;
       PostDecoderError(NS_ERROR_OUT_OF_MEMORY);
-      PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+      MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
              ("} (could not initialize image frame)"));
       return;
     }
 
     if (mDownscaler) {
       nsresult rv = mDownscaler->BeginFrame(GetSize(),
                                             mImageData,
                                             /* aHasAlpha = */ false);
       if (NS_FAILED(rv)) {
         mState = JPEG_ERROR;
         return;
       }
     }
 
-    PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
            ("        JPEGDecoderAccounting: nsJPEGDecoder::"
             "Write -- created image frame with %ux%u pixels",
             mInfo.output_width, mInfo.output_height));
 
     mState = JPEG_START_DECOMPRESS;
   }
 
   case JPEG_START_DECOMPRESS: {
@@ -433,17 +433,17 @@ nsJPEGDecoder::WriteInternal(const char*
     mInfo.dct_method =  JDCT_ISLOW;
     mInfo.dither_mode = JDITHER_FS;
     mInfo.do_fancy_upsampling = TRUE;
     mInfo.enable_2pass_quant = FALSE;
     mInfo.do_block_smoothing = TRUE;
 
     // Step 5: Start decompressor
     if (jpeg_start_decompress(&mInfo) == FALSE) {
-      PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+      MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
              ("} (I/O suspension after jpeg_start_decompress())"));
       return; // I/O suspension
     }
 
     // If this is a progressive JPEG ...
     mState = mInfo.buffered_image ?
              JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL;
   }
@@ -452,17 +452,17 @@ nsJPEGDecoder::WriteInternal(const char*
     if (mState == JPEG_DECOMPRESS_SEQUENTIAL) {
       LOG_SCOPE(GetJPEGLog(), "nsJPEGDecoder::Write -- "
                               "JPEG_DECOMPRESS_SEQUENTIAL case");
 
       bool suspend;
       OutputScanlines(&suspend);
 
       if (suspend) {
-        PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+        MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
                ("} (I/O suspension after OutputScanlines() - SEQUENTIAL)"));
         return; // I/O suspension
       }
 
       // If we've completed image output ...
       NS_ASSERTION(mInfo.output_scanline == mInfo.output_height,
                    "We didn't process all of the data!");
       mState = JPEG_DONE;
@@ -488,17 +488,17 @@ nsJPEGDecoder::WriteInternal(const char*
           // and we have enough data for a complete scan, force output
           // of the last full scan
           if ((mInfo.output_scan_number == 0) &&
               (scan > 1) &&
               (status != JPEG_REACHED_EOI))
             scan--;
 
           if (!jpeg_start_output(&mInfo, scan)) {
-            PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+            MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
                    ("} (I/O suspension after jpeg_start_output() -"
                     " PROGRESSIVE)"));
             return; // I/O suspension
           }
         }
 
         if (mInfo.output_scanline == 0xffffff) {
           mInfo.output_scanline = 0;
@@ -508,24 +508,24 @@ nsJPEGDecoder::WriteInternal(const char*
         OutputScanlines(&suspend);
 
         if (suspend) {
           if (mInfo.output_scanline == 0) {
             // didn't manage to read any lines - flag so we don't call
             // jpeg_start_output() multiple times for the same scan
             mInfo.output_scanline = 0xffffff;
           }
-          PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+          MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
                  ("} (I/O suspension after OutputScanlines() - PROGRESSIVE)"));
           return; // I/O suspension
         }
 
         if (mInfo.output_scanline == mInfo.output_height) {
           if (!jpeg_finish_output(&mInfo)) {
-            PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+            MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
                    ("} (I/O suspension after jpeg_finish_output() -"
                     " PROGRESSIVE)"));
             return; // I/O suspension
           }
 
           if (jpeg_input_complete(&mInfo) &&
               (mInfo.input_scan_number == mInfo.output_scan_number))
             break;
@@ -543,40 +543,40 @@ nsJPEGDecoder::WriteInternal(const char*
 
   case JPEG_DONE: {
     LOG_SCOPE(GetJPEGLog(), "nsJPEGDecoder::ProcessData -- entering"
                             " JPEG_DONE case");
 
     // Step 7: Finish decompression
 
     if (jpeg_finish_decompress(&mInfo) == FALSE) {
-      PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+      MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
              ("} (I/O suspension after jpeg_finish_decompress() - DONE)"));
       return; // I/O suspension
     }
 
     mState = JPEG_SINK_NON_JPEG_TRAILER;
 
     // we're done dude
     break;
   }
   case JPEG_SINK_NON_JPEG_TRAILER:
-    PR_LOG(GetJPEGLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetJPEGLog(), PR_LOG_DEBUG,
            ("[this=%p] nsJPEGDecoder::ProcessData -- entering"
             " JPEG_SINK_NON_JPEG_TRAILER case\n", this));
 
     break;
 
   case JPEG_ERROR:
     MOZ_ASSERT(false,
                "Should always return immediately after error and not re-enter "
                "decoder");
   }
 
-  PR_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
+  MOZ_LOG(GetJPEGDecoderAccountingLog(), PR_LOG_DEBUG,
          ("} (end of function)"));
   return;
 }
 
 Orientation
 nsJPEGDecoder::ReadOrientationFromEXIF()
 {
   jpeg_saved_marker_ptr marker;
--- a/image/decoders/nsPNGDecoder.cpp
+++ b/image/decoders/nsPNGDecoder.cpp
@@ -163,17 +163,17 @@ void nsPNGDecoder::CreateFrame(png_uint_
 
     NeedNewFrame(mNumFrames, x_offset, y_offset, width, height, format);
   } else if (mNumFrames != 0) {
     NeedNewFrame(mNumFrames, x_offset, y_offset, width, height, format);
   }
 
   mFrameRect = neededRect;
 
-  PR_LOG(GetPNGDecoderAccountingLog(), PR_LOG_DEBUG,
+  MOZ_LOG(GetPNGDecoderAccountingLog(), PR_LOG_DEBUG,
          ("PNGDecoderAccounting: nsPNGDecoder::CreateFrame -- created "
           "image frame with %dx%d pixels in container %p",
           width, height,
           &mImage));
 
 #ifdef PNG_APNG_SUPPORTED
   if (png_get_valid(mPNG, mInfo, PNG_INFO_acTL)) {
     mAnimInfo = AnimFrameInfo(mPNG, mInfo);
@@ -871,25 +871,25 @@ nsPNGDecoder::end_callback(png_structp p
   decoder->EndImageFrame();
   decoder->PostDecodeDone(loop_count);
 }
 
 
 void
 nsPNGDecoder::error_callback(png_structp png_ptr, png_const_charp error_msg)
 {
-  PR_LOG(GetPNGLog(), PR_LOG_ERROR, ("libpng error: %s\n", error_msg));
+  MOZ_LOG(GetPNGLog(), PR_LOG_ERROR, ("libpng error: %s\n", error_msg));
   png_longjmp(png_ptr, 1);
 }
 
 
 void
 nsPNGDecoder::warning_callback(png_structp png_ptr, png_const_charp warning_msg)
 {
-  PR_LOG(GetPNGLog(), PR_LOG_WARNING, ("libpng warning: %s\n", warning_msg));
+  MOZ_LOG(GetPNGLog(), PR_LOG_WARNING, ("libpng warning: %s\n", warning_msg));
 }
 
 Telemetry::ID
 nsPNGDecoder::SpeedHistogram()
 {
   return Telemetry::IMAGE_DECODE_SPEED_PNG;
 }
 
--- a/image/encoders/png/nsPNGEncoder.cpp
+++ b/image/encoders/png/nsPNGEncoder.cpp
@@ -692,28 +692,28 @@ nsPNGEncoder::StripAlpha(const uint8_t* 
 
 
 // nsPNGEncoder::WarningCallback
 
 void
 nsPNGEncoder::WarningCallback(png_structp png_ptr,
                             png_const_charp warning_msg)
 {
-  PR_LOG(GetPNGEncoderLog(), PR_LOG_WARNING,
+  MOZ_LOG(GetPNGEncoderLog(), PR_LOG_WARNING,
          ("libpng warning: %s\n", warning_msg));
 }
 
 
 // nsPNGEncoder::ErrorCallback
 
 void
 nsPNGEncoder::ErrorCallback(png_structp png_ptr,
                             png_const_charp error_msg)
 {
-  PR_LOG(GetPNGEncoderLog(), PR_LOG_ERROR, ("libpng error: %s\n", error_msg));
+  MOZ_LOG(GetPNGEncoderLog(), PR_LOG_ERROR, ("libpng error: %s\n", error_msg));
   png_longjmp(png_ptr, 1);
 }
 
 // nsPNGEncoder::WriteCallback
 
 void // static
 nsPNGEncoder::WriteCallback(png_structp png, png_bytep data,
                             png_size_t size)
--- a/image/imgLoader.cpp
+++ b/image/imgLoader.cpp
@@ -1395,30 +1395,30 @@ imgLoader::PutIntoCache(const ImageCache
 
   LOG_STATIC_FUNC_WITH_PARAM(GetImgLog(),
                              "imgLoader::PutIntoCache", "uri", aKey.Spec());
 
   // Check to see if this request already exists in the cache. If so, we'll
   // replace the old version.
   nsRefPtr<imgCacheEntry> tmpCacheEntry;
   if (cache.Get(aKey, getter_AddRefs(tmpCacheEntry)) && tmpCacheEntry) {
-    PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
            ("[this=%p] imgLoader::PutIntoCache -- Element already in the cache",
             nullptr));
     nsRefPtr<imgRequest> tmpRequest = tmpCacheEntry->GetRequest();
 
     // If it already exists, and we're putting the same key into the cache, we
     // should remove the old version.
-    PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
            ("[this=%p] imgLoader::PutIntoCache -- Replacing cached element",
             nullptr));
 
     RemoveFromCache(aKey);
   } else {
-    PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
            ("[this=%p] imgLoader::PutIntoCache --"
             " Element NOT already in the cache", nullptr));
   }
 
   cache.Put(aKey, entry);
 
   // We can be called to resurrect an evicted entry.
   if (entry->Evicted()) {
@@ -1761,24 +1761,24 @@ imgLoader::ValidateEntry(imgCacheEntry* 
     // bypass the cache, we don't allow this entry to be used.
     if (aLoadFlags & nsIRequest::LOAD_BYPASS_CACHE) {
       return false;
     }
 
     // Determine whether the cache aEntry must be revalidated...
     validateRequest = ShouldRevalidateEntry(aEntry, aLoadFlags, hasExpired);
 
-    PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
            ("imgLoader::ValidateEntry validating cache entry. "
             "validateRequest = %d", validateRequest));
   } else if (!key && PR_LOG_TEST(GetImgLog(), PR_LOG_DEBUG)) {
     nsAutoCString spec;
     aURI->GetSpec(spec);
 
-    PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
            ("imgLoader::ValidateEntry BYPASSING cache validation for %s "
             "because of NULL LoadID", spec.get()));
   }
 
   // We can't use a cached request if it comes from a different
   // application cache than this load is expecting.
   nsCOMPtr<nsIApplicationCacheContainer> appCacheContainer;
   nsCOMPtr<nsIApplicationCache> requestAppCache;
@@ -1786,17 +1786,17 @@ imgLoader::ValidateEntry(imgCacheEntry* 
   if ((appCacheContainer = do_GetInterface(request->GetRequest()))) {
     appCacheContainer->GetApplicationCache(getter_AddRefs(requestAppCache));
   }
   if ((appCacheContainer = do_QueryInterface(aLoadGroup))) {
     appCacheContainer->GetApplicationCache(getter_AddRefs(groupAppCache));
   }
 
   if (requestAppCache != groupAppCache) {
-    PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
            ("imgLoader::ValidateEntry - Unable to use cached imgRequest "
             "[request=%p] because of mismatched application caches\n",
             address_of(request)));
     return false;
   }
 
   if (validateRequest && aCanMakeNewChannel) {
     LOG_SCOPE(GetImgLog(),
@@ -2160,17 +2160,17 @@ imgLoader::LoadImage(nsIURI* aURI,
     }
 
     MOZ_ASSERT(NS_UsePrivateBrowsing(newChannel) == mRespectPrivacy);
 
     NewRequestAndEntry(forcePrincipalCheck, this, key,
                        getter_AddRefs(request),
                        getter_AddRefs(entry));
 
-    PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
            ("[this=%p] imgLoader::LoadImage -- Created new imgRequest"
             " [request=%p]\n", this, request.get()));
 
     nsCOMPtr<nsILoadGroup> channelLoadGroup;
     newChannel->GetLoadGroup(getter_AddRefs(channelLoadGroup));
     request->Init(aURI, aURI, /* aHadInsecureRedirect = */ false,
                   channelLoadGroup, newChannel, entry, aCX,
                   aLoadingPrincipal, corsmode, aReferrerPolicy);
@@ -2183,46 +2183,46 @@ imgLoader::LoadImage(nsIURI* aURI,
 
     // create the proxy listener
     nsCOMPtr<nsIStreamListener> pl = new ProxyListener(request.get());
 
     // See if we need to insert a CORS proxy between the proxy listener and the
     // request.
     nsCOMPtr<nsIStreamListener> listener = pl;
     if (corsmode != imgIRequest::CORS_NONE) {
-      PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+      MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
              ("[this=%p] imgLoader::LoadImage -- Setting up a CORS load",
               this));
       bool withCredentials = corsmode == imgIRequest::CORS_USE_CREDENTIALS;
 
       nsRefPtr<nsCORSListenerProxy> corsproxy =
         new nsCORSListenerProxy(pl, aLoadingPrincipal, withCredentials);
       rv = corsproxy->Init(newChannel, DataURIHandling::Allow);
       if (NS_FAILED(rv)) {
-        PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+        MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
                ("[this=%p] imgLoader::LoadImage -- nsCORSListenerProxy "
                 "creation failed: 0x%x\n", this, rv));
         request->CancelAndAbort(rv);
         return NS_ERROR_FAILURE;
       }
 
       listener = corsproxy;
     }
 
-    PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
            ("[this=%p] imgLoader::LoadImage -- Calling channel->AsyncOpen()\n",
             this));
 
     mozilla::net::PredictorLearn(aURI, aInitialDocumentURI,
         nsINetworkPredictor::LEARN_LOAD_SUBRESOURCE, aLoadGroup);
 
     nsresult openRes = newChannel->AsyncOpen(listener, nullptr);
 
     if (NS_FAILED(openRes)) {
-      PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+      MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
              ("[this=%p] imgLoader::LoadImage -- AsyncOpen() failed: 0x%x\n",
               this, openRes));
       request->CancelAndAbort(openRes);
       return openRes;
     }
 
     // Try to add the new request into the cache.
     PutIntoCache(key, entry);
@@ -2668,17 +2668,17 @@ ProxyListener::CheckListenerChain()
 {
   NS_ASSERTION(NS_IsMainThread(), "Should be on the main thread!");
   nsresult rv = NS_OK;
   nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
     do_QueryInterface(mDestListener, &rv);
   if (retargetableListener) {
     rv = retargetableListener->CheckListenerChain();
   }
-  PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+  MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
          ("ProxyListener::CheckListenerChain %s [this=%p listener=%p rv=%x]",
           (NS_SUCCEEDED(rv) ? "success" : "failure"),
           this, (nsIStreamListener*)mDestListener, rv));
   return rv;
 }
 
 /**
  * http validate class.  check a channel for a 304
@@ -2895,17 +2895,17 @@ imgCacheValidator::CheckListenerChain()
 {
   NS_ASSERTION(NS_IsMainThread(), "Should be on the main thread!");
   nsresult rv = NS_OK;
   nsCOMPtr<nsIThreadRetargetableStreamListener> retargetableListener =
     do_QueryInterface(mDestListener, &rv);
   if (retargetableListener) {
     rv = retargetableListener->CheckListenerChain();
   }
-  PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+  MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
          ("[this=%p] imgCacheValidator::CheckListenerChain -- rv %d=%s",
           this, NS_SUCCEEDED(rv) ? "succeeded" : "failed", rv));
   return rv;
 }
 
 /** nsIInterfaceRequestor methods **/
 
 NS_IMETHODIMP
--- a/image/imgRequest.cpp
+++ b/image/imgRequest.cpp
@@ -784,17 +784,17 @@ imgRequest::OnStartRequest(nsIRequest* a
     nsAutoCString mimeType;
     nsresult rv = httpChannel->GetContentType(mimeType);
     if (NS_SUCCEEDED(rv) && !mimeType.EqualsLiteral(IMAGE_SVG_XML)) {
       // Retarget OnDataAvailable to the DecodePool's IO thread.
       nsCOMPtr<nsIEventTarget> target =
         DecodePool::Singleton()->GetIOEventTarget();
       rv = retargetable->RetargetDeliveryTo(target);
     }
-    PR_LOG(GetImgLog(), PR_LOG_WARNING,
+    MOZ_LOG(GetImgLog(), PR_LOG_WARNING,
            ("[this=%p] imgRequest::OnStartRequest -- "
             "RetargetDeliveryTo rv %d=%s\n",
             this, rv, NS_SUCCEEDED(rv) ? "succeeded" : "failed"));
   }
 
   return NS_OK;
 }
 
@@ -940,24 +940,24 @@ PrepareForNewPart(nsIRequest* aRequest, 
   if (result.mContentType.IsEmpty()) {
     nsresult rv = NS_ERROR_FAILURE;
     if (chan) {
       rv = chan->GetContentType(result.mContentType);
       chan->GetContentDispositionHeader(result.mContentDisposition);
     }
 
     if (NS_FAILED(rv)) {
-      PR_LOG(GetImgLog(),
+      MOZ_LOG(GetImgLog(),
              PR_LOG_ERROR, ("imgRequest::PrepareForNewPart "
                             "-- Content type unavailable from the channel\n"));
       return result;
     }
   }
 
-  PR_LOG(GetImgLog(), PR_LOG_DEBUG,
+  MOZ_LOG(GetImgLog(), PR_LOG_DEBUG,
          ("imgRequest::PrepareForNewPart -- Got content type %s\n",
           result.mContentType.get()));
 
   // XXX If server lied about mimetype and it's SVG, we may need to copy
   // the data and dispatch back to the main thread, AND tell the channel to
   // dispatch there in the future.
 
   // Create the new image and give it ownership of our ProgressTracker.
@@ -1106,17 +1106,17 @@ imgRequest::OnDataAvailable(nsIRequest* 
     }
   }
 
   // Notify the image that it has new data.
   nsresult rv =
     image->OnImageDataAvailable(aRequest, aContext, aInStr, aOffset, aCount);
 
   if (NS_FAILED(rv)) {
-    PR_LOG(GetImgLog(), PR_LOG_WARNING,
+    MOZ_LOG(GetImgLog(), PR_LOG_WARNING,
            ("[this=%p] imgRequest::OnDataAvailable -- "
             "copy to RasterImage failed\n", this));
     Cancel(NS_IMAGELIB_ERROR_FAILURE);
     return NS_BINDING_ABORTED;
   }
 
   return NS_OK;
 }
--- a/js/xpconnect/loader/mozJSComponentLoader.cpp
+++ b/js/xpconnect/loader/mozJSComponentLoader.cpp
@@ -67,17 +67,17 @@ static const char kJSCachePrefix[] = "js
  * FIXME: bug #411579 (tune this macro!) Last updated: Jan 2008
  */
 #define XPC_SERIALIZATION_BUFFER_SIZE   (64 * 1024)
 #define XPC_DESERIALIZATION_BUFFER_SIZE (12 * 8192)
 
 // NSPR_LOG_MODULES=JSComponentLoader:5
 static PRLogModuleInfo* gJSCLLog;
 
-#define LOG(args) PR_LOG(gJSCLLog, PR_LOG_DEBUG, args)
+#define LOG(args) MOZ_LOG(gJSCLLog, PR_LOG_DEBUG, args)
 
 // Components.utils.import error messages
 #define ERROR_SCOPE_OBJ "%s - Second argument must be an object."
 #define ERROR_NOT_PRESENT "%s - EXPORTED_SYMBOLS is not present."
 #define ERROR_NOT_AN_ARRAY "%s - EXPORTED_SYMBOLS is not an array."
 #define ERROR_GETTING_ARRAY_LENGTH "%s - Error getting array length of EXPORTED_SYMBOLS."
 #define ERROR_ARRAY_ELEMENT "%s - EXPORTED_SYMBOLS[%d] is not a string."
 #define ERROR_GETTING_SYMBOL "%s - Could not get symbol '%s'."
--- a/js/xpconnect/src/nsXPConnect.cpp
+++ b/js/xpconnect/src/nsXPConnect.cpp
@@ -240,17 +240,17 @@ xpc::ErrorReport::LogToConsole()
         fprintf(stderr, "%s\n", error.get());
         fflush(stderr);
     }
 
     // Log to the PR Log Module.
     if (!gJSDiagnostics)
         gJSDiagnostics = PR_NewLogModule("JSDiagnostics");
     if (gJSDiagnostics) {
-        PR_LOG(gJSDiagnostics,
+        MOZ_LOG(gJSDiagnostics,
                 JSREPORT_IS_WARNING(mFlags) ? PR_LOG_WARNING : PR_LOG_ERROR,
                 ("file %s, line %u\n%s", NS_LossyConvertUTF16toASCII(mFileName).get(),
                  mLineNumber, NS_LossyConvertUTF16toASCII(mErrorMsg).get()));
     }
 
     // Log to the console. We do this last so that we can simply return if
     // there's no console service without affecting the other reporting
     // mechanisms.
--- a/layout/base/AccessibleCaretLogger.h
+++ b/layout/base/AccessibleCaretLogger.h
@@ -9,19 +9,19 @@
 
 #include "mozilla/Logging.h"
 
 namespace mozilla {
 
 PRLogModuleInfo* GetAccessibleCaretLog();
 
 #ifndef AC_LOG_BASE
-#define AC_LOG_BASE(...) PR_LOG(GetAccessibleCaretLog(), PR_LOG_DEBUG, (__VA_ARGS__));
+#define AC_LOG_BASE(...) MOZ_LOG(GetAccessibleCaretLog(), PR_LOG_DEBUG, (__VA_ARGS__));
 #endif
 
 #ifndef AC_LOGV_BASE
 #define AC_LOGV_BASE(...)                                                      \
-  PR_LOG(GetAccessibleCaretLog(), PR_LOG_DEBUG + 1, (__VA_ARGS__));
+  MOZ_LOG(GetAccessibleCaretLog(), PR_LOG_DEBUG + 1, (__VA_ARGS__));
 #endif
 
 } // namespace mozilla
 
 #endif // AccessibleCaretLog_h
--- a/layout/base/SelectionCarets.cpp
+++ b/layout/base/SelectionCarets.cpp
@@ -40,22 +40,22 @@ using namespace mozilla;
 using namespace mozilla::dom;
 
 static PRLogModuleInfo* gSelectionCaretsLog;
 static const char* kSelectionCaretsLogModuleName = "SelectionCarets";
 
 // To enable all the SELECTIONCARETS_LOG print statements, set the environment
 // variable NSPR_LOG_MODULES=SelectionCarets:5
 #define SELECTIONCARETS_LOG(message, ...)                                      \
-  PR_LOG(gSelectionCaretsLog, PR_LOG_DEBUG,                                    \
+  MOZ_LOG(gSelectionCaretsLog, PR_LOG_DEBUG,                                    \
          ("SelectionCarets (%p): %s:%d : " message "\n", this, __FUNCTION__,   \
           __LINE__, ##__VA_ARGS__));
 
 #define SELECTIONCARETS_LOG_STATIC(message, ...)                               \
-  PR_LOG(gSelectionCaretsLog, PR_LOG_DEBUG,                                    \
+  MOZ_LOG(gSelectionCaretsLog, PR_LOG_DEBUG,                                    \
          ("SelectionCarets: %s:%d : " message "\n", __FUNCTION__, __LINE__,    \
           ##__VA_ARGS__));
 
 // We treat mouse/touch move as "REAL" move event once its move distance
 // exceed this value, in CSS pixel.
 static const int32_t kMoveStartTolerancePx = 5;
 
 NS_IMPL_ISUPPORTS(SelectionCarets,
--- a/layout/base/TouchCaret.cpp
+++ b/layout/base/TouchCaret.cpp
@@ -37,22 +37,22 @@
 using namespace mozilla;
 
 static PRLogModuleInfo* gTouchCaretLog;
 static const char* kTouchCaretLogModuleName = "TouchCaret";
 
 // To enable all the TOUCHCARET_LOG print statements, set the environment
 // variable NSPR_LOG_MODULES=TouchCaret:5
 #define TOUCHCARET_LOG(message, ...)                                           \
-  PR_LOG(gTouchCaretLog, PR_LOG_DEBUG,                                         \
+  MOZ_LOG(gTouchCaretLog, PR_LOG_DEBUG,                                         \
          ("TouchCaret (%p): %s:%d : " message "\n", this, __FUNCTION__,        \
           __LINE__, ##__VA_ARGS__));
 
 #define TOUCHCARET_LOG_STATIC(message, ...)                                    \
-  PR_LOG(gTouchCaretLog, PR_LOG_DEBUG,                                         \
+  MOZ_LOG(gTouchCaretLog, PR_LOG_DEBUG,                                         \
          ("TouchCaret: %s:%d : " message "\n", __FUNCTION__, __LINE__,         \
           ##__VA_ARGS__));
 
 // Click on the boundary of input/textarea will place the caret at the
 // front/end of the content. To advoid this, we need to deflate the content
 // boundary by 61 app units (1 pixel + 1 app unit).
 static const int32_t kBoundaryAppUnits = 61;
 
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -137,17 +137,17 @@ using namespace mozilla::dom;
 static PRLogModuleInfo *
 GetPrintingLog()
 {
   static PRLogModuleInfo *sLog;
   if (!sLog)
     sLog = PR_NewLogModule("printing");
   return sLog;
 }
-#define PR_PL(_p1)  PR_LOG(GetPrintingLog(), PR_LOG_DEBUG, _p1);
+#define PR_PL(_p1)  MOZ_LOG(GetPrintingLog(), PR_LOG_DEBUG, _p1);
 #endif // NS_PRINTING
 
 #define PRT_YESNO(_p) ((_p)?"YES":"NO")
 //-----------------------------------------------------
 
 class nsDocumentViewer;
 class nsPrintEventDispatcher;
 
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -1024,17 +1024,17 @@ LogTextPerfStats(gfxTextPerfMetrics* aTe
 
   double hitRatio = 0.0;
   uint32_t lookups = aCounts.wordCacheHit + aCounts.wordCacheMiss;
   if (lookups) {
     hitRatio = double(aCounts.wordCacheHit) / double(lookups);
   }
 
   if (aLogType == eLog_loaddone) {
-    PR_LOG(tpLog, logLevel,
+    MOZ_LOG(tpLog, logLevel,
            ("%s reflow: %d chars: %d "
             "[%s] "
             "content-textruns: %d chrome-textruns: %d "
             "max-textrun-len: %d "
             "word-cache-lookups: %d word-cache-hit-ratio: %4.3f "
             "word-cache-space: %d word-cache-long: %d "
             "pref-fallbacks: %d system-fallbacks: %d "
             "textruns-const: %d textruns-destr: %d "
@@ -1044,17 +1044,17 @@ LogTextPerfStats(gfxTextPerfMetrics* aTe
             aCounts.numContentTextRuns, aCounts.numChromeTextRuns,
             aCounts.maxTextRunLen,
             lookups, hitRatio,
             aCounts.wordCacheSpaceRules, aCounts.wordCacheLong,
             aCounts.fallbackPrefs, aCounts.fallbackSystem,
             aCounts.textrunConst, aCounts.textrunDestr,
             aTextPerf->cumulative.textrunDestr));
   } else {
-    PR_LOG(tpLog, logLevel,
+    MOZ_LOG(tpLog, logLevel,
            ("%s reflow: %d chars: %d "
             "content-textruns: %d chrome-textruns: %d "
             "max-textrun-len: %d "
             "word-cache-lookups: %d word-cache-hit-ratio: %4.3f "
             "word-cache-space: %d word-cache-long: %d "
             "pref-fallbacks: %d system-fallbacks: %d "
             "textruns-const: %d textruns-destr: %d "
             "cumulative-textruns-destr: %d\n",
@@ -2713,17 +2713,17 @@ PresShell::BeginLoad(nsIDocument *aDocum
   }
 
   if (shouldLog) {
     nsIURI* uri = mDocument->GetDocumentURI();
     nsAutoCString spec;
     if (uri) {
       uri->GetSpec(spec);
     }
-    PR_LOG(gLog, PR_LOG_DEBUG,
+    MOZ_LOG(gLog, PR_LOG_DEBUG,
            ("(presshell) %p load begin [%s]\n",
             this, spec.get()));
   }
 }
 
 void
 PresShell::EndLoad(nsIDocument *aDocument)
 {
@@ -2747,17 +2747,17 @@ PresShell::LoadComplete()
   if (shouldLog || tp) {
     TimeDuration loadTime = TimeStamp::Now() - mLoadBegin;
     nsIURI* uri = mDocument->GetDocumentURI();
     nsAutoCString spec;
     if (uri) {
       uri->GetSpec(spec);
     }
     if (shouldLog) {
-      PR_LOG(gLog, PR_LOG_DEBUG,
+      MOZ_LOG(gLog, PR_LOG_DEBUG,
              ("(presshell) %p load done time-ms: %9.2f [%s]\n",
               this, loadTime.ToMilliseconds(), spec.get()));
     }
     if (tp) {
       tp->Accumulate();
       if (tp->cumulative.numChars > 0) {
         LogTextPerfStats(tp, this, tp->cumulative, loadTime.ToMilliseconds(),
                          eLog_loaddone, spec.get());
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -69,17 +69,17 @@
 #endif
 
 using namespace mozilla;
 using namespace mozilla::widget;
 using namespace mozilla::ipc;
 using namespace mozilla::layout;
 
 static PRLogModuleInfo *gLog = nullptr;
-#define LOG(...) PR_LOG(gLog, PR_LOG_NOTICE, (__VA_ARGS__))
+#define LOG(...) MOZ_LOG(gLog, PR_LOG_NOTICE, (__VA_ARGS__))
 
 #define DEFAULT_FRAME_RATE 60
 #define DEFAULT_THROTTLED_FRAME_RATE 1
 // after 10 minutes, stop firing off inactive timers
 #define DEFAULT_INACTIVE_TIMER_DISABLE_SECONDS 600
 
 namespace mozilla {
 
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -2127,17 +2127,17 @@ FlexLine::FreezeOrRestoreEachFlexibleSiz
       item->ClearViolationFlags();
     }
   }
 }
 
 void
 FlexLine::ResolveFlexibleLengths(nscoord aFlexContainerMainSize)
 {
-  PR_LOG(GetFlexContainerLog(), PR_LOG_DEBUG, ("ResolveFlexibleLengths\n"));
+  MOZ_LOG(GetFlexContainerLog(), PR_LOG_DEBUG, ("ResolveFlexibleLengths\n"));
 
   // Determine whether we're going to be growing or shrinking items.
   const bool isUsingFlexGrow =
     (mTotalOuterHypotheticalMainSize < aFlexContainerMainSize);
 
   // Do an "early freeze" for flex items that obviously can't flex in the
   // direction we've chosen:
   FreezeItemsEarly(isUsingFlexGrow);
@@ -2175,17 +2175,17 @@ FlexLine::ResolveFlexibleLengths(nscoord
     nscoord availableFreeSpace = spaceAvailableForFlexItemsContentBoxes;
     for (FlexItem* item = mItems.getFirst(); item; item = item->getNext()) {
       if (!item->IsFrozen()) {
         item->SetMainSize(item->GetFlexBaseSize());
       }
       availableFreeSpace -= item->GetMainSize();
     }
 
-    PR_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
            (" available free space = %d\n", availableFreeSpace));
 
 
     // The sign of our free space should agree with the type of flexing
     // (grow/shrink) that we're doing (except if we've had integer overflow;
     // then, all bets are off). Any disagreement should've made us use the
     // other type of flexing, or should've been resolved in FreezeItemsEarly.
     // XXXdholbert If & when bug 765861 is fixed, we should upgrade this
@@ -2287,17 +2287,17 @@ FlexLine::ResolveFlexibleLengths(nscoord
             availableFreeSpace = std::min(availableFreeSpace,
                                           totalDesiredPortionOfOrigFreeSpace);
           } else {
             availableFreeSpace = std::max(availableFreeSpace,
                                           totalDesiredPortionOfOrigFreeSpace);
           }
         }
 
-        PR_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
+        MOZ_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
                (" Distributing available space:"));
         // Since this loop only operates on unfrozen flex items, we can break as
         // soon as we have seen all of them.
         numUnfrozenItemsToBeSeen = mNumItems - mNumFrozenItems;
 
         // NOTE: It's important that we traverse our items in *reverse* order
         // here, for correct width distribution according to the items'
         // "ShareOfWeightSoFar" progressively-calculated values.
@@ -2335,27 +2335,27 @@ FlexLine::ResolveFlexibleLengths(nscoord
                 NSToCoordRound(availableFreeSpace /
                                float(numItemsWithLargestWeight));
               numItemsWithLargestWeight--;
             }
 
             availableFreeSpace -= sizeDelta;
 
             item->SetMainSize(item->GetMainSize() + sizeDelta);
-            PR_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
+            MOZ_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
                    ("  child %p receives %d, for a total of %d\n",
                     item, sizeDelta, item->GetMainSize()));
           }
         }
       }
     }
 
     // Fix min/max violations:
     nscoord totalViolation = 0; // keeps track of adjustments for min/max
-    PR_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
            (" Checking for violations:"));
 
     // Since this loop only operates on unfrozen flex items, we can break as
     // soon as we have seen all of them.
     uint32_t numUnfrozenItemsToBeSeen = mNumItems - mNumFrozenItems;
     for (FlexItem* item = mItems.getFirst();
          numUnfrozenItemsToBeSeen > 0; item = item->getNext()) {
       MOZ_ASSERT(item, "numUnfrozenItemsToBeSeen says items remain to be seen");
@@ -2374,17 +2374,17 @@ FlexLine::ResolveFlexibleLengths(nscoord
           item->SetHadMaxViolation();
         }
       }
     }
 
     FreezeOrRestoreEachFlexibleSize(totalViolation,
                                     iterationCounter + 1 == mNumItems);
 
-    PR_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
+    MOZ_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
            (" Total violation: %d\n", totalViolation));
 
     if (mNumFrozenItems == mNumItems) {
       break;
     }
 
     MOZ_ASSERT(totalViolation != 0,
                "Zero violation should've made us freeze all items & break");
@@ -3523,17 +3523,17 @@ void
 nsFlexContainerFrame::Reflow(nsPresContext*           aPresContext,
                              nsHTMLReflowMetrics&     aDesiredSize,
                              const nsHTMLReflowState& aReflowState,
                              nsReflowStatus&          aStatus)
 {
   MarkInReflow();
   DO_GLOBAL_REFLOW_COUNT("nsFlexContainerFrame");
   DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
-  PR_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
+  MOZ_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
          ("Reflow() for nsFlexContainerFrame %p\n", this));
 
   if (IsFrameTreeTooDeep(aReflowState, aDesiredSize, aStatus)) {
     return;
   }
 
   // We (and our children) can only depend on our ancestor's height if we have
   // a percent-height, or if we're positioned and we have "top" and "bottom"
--- a/layout/generic/nsPageFrame.cpp
+++ b/layout/generic/nsPageFrame.cpp
@@ -18,17 +18,17 @@
 #include "nsLayoutUtils.h" // for function BinarySearchForPosition
 #include "nsSimplePageSequenceFrame.h" // for nsSharedPageData
 #include "nsTextFormatter.h" // for page number localization formatting
 #include "nsBidiUtils.h"
 #include "nsIPrintSettings.h"
 
 #include "mozilla/Logging.h"
 extern PRLogModuleInfo *GetLayoutPrintingLog();
-#define PR_PL(_p1)  PR_LOG(GetLayoutPrintingLog(), PR_LOG_DEBUG, _p1)
+#define PR_PL(_p1)  MOZ_LOG(GetLayoutPrintingLog(), PR_LOG_DEBUG, _p1)
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 
 nsPageFrame*
 NS_NewPageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
   return new (aPresShell) nsPageFrame(aContext);
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -152,23 +152,23 @@ protected:
   uint64_t mLastSequenceNumber;
   nsPluginFrame* mFrame;
 };
 
 nsPluginFrame::nsPluginFrame(nsStyleContext* aContext)
   : nsPluginFrameSuper(aContext)
   , mReflowCallbackPosted(false)
 {
-  PR_LOG(GetObjectFrameLog(), PR_LOG_DEBUG,
+  MOZ_LOG(GetObjectFrameLog(), PR_LOG_DEBUG,
          ("Created new nsPluginFrame %p\n", this));
 }
 
 nsPluginFrame::~nsPluginFrame()
 {
-  PR_LOG(GetObjectFrameLog(), PR_LOG_DEBUG,
+  MOZ_LOG(GetObjectFrameLog(), PR_LOG_DEBUG,
          ("nsPluginFrame %p deleted\n", this));
 }
 
 NS_QUERYFRAME_HEAD(nsPluginFrame)
   NS_QUERYFRAME_ENTRY(nsPluginFrame)
   NS_QUERYFRAME_ENTRY(nsIObjectFrame)
 NS_QUERYFRAME_TAIL_INHERITING(nsPluginFrameSuper)
 
@@ -188,17 +188,17 @@ NS_IMETHODIMP nsPluginFrame::GetPluginPo
 #endif
 #endif
 
 void
 nsPluginFrame::Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow)
 {
-  PR_LOG(GetObjectFrameLog(), PR_LOG_DEBUG,
+  MOZ_LOG(GetObjectFrameLog(), PR_LOG_DEBUG,
          ("Initializing nsPluginFrame %p for content %p\n", this, aContent));
 
   nsPluginFrameSuper::Init(aContent, aParent, aPrevInFlow);
 }
 
 void
 nsPluginFrame::DestroyFrom(nsIFrame* aDestructRoot)
 {
--- a/layout/generic/nsSimplePageSequenceFrame.cpp
+++ b/layout/generic/nsSimplePageSequenceFrame.cpp
@@ -45,17 +45,17 @@ static const char sPrintOptionsContractI
 PRLogModuleInfo *
 GetLayoutPrintingLog()
 {
   static PRLogModuleInfo *sLog;
   if (!sLog)
     sLog = PR_NewLogModule("printing-layout");
   return sLog;
 }
-#define PR_PL(_p1)  PR_LOG(GetLayoutPrintingLog(), PR_LOG_DEBUG, _p1)
+#define PR_PL(_p1)  MOZ_LOG(GetLayoutPrintingLog(), PR_LOG_DEBUG, _p1)
 
 nsSimplePageSequenceFrame*
 NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
   return new (aPresShell) nsSimplePageSequenceFrame(aContext);
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsSimplePageSequenceFrame)
--- a/layout/printing/nsPrintData.cpp
+++ b/layout/printing/nsPrintData.cpp
@@ -20,17 +20,17 @@
 static PRLogModuleInfo *
 GetPrintingLog()
 {
   static PRLogModuleInfo *sLog;
   if (!sLog)
     sLog = PR_NewLogModule("printing");
   return sLog;
 }
-#define PR_PL(_p1)  PR_LOG(GetPrintingLog(), PR_LOG_DEBUG, _p1);
+#define PR_PL(_p1)  MOZ_LOG(GetPrintingLog(), PR_LOG_DEBUG, _p1);
 
 //---------------------------------------------------
 //-- nsPrintData Class Impl
 //---------------------------------------------------
 nsPrintData::nsPrintData(ePrintDataType aType) :
   mType(aType), mDebugFilePtr(nullptr), mPrintObject(nullptr), mSelecte