Bug 1275744 - Reference MOZ_LOG in dom comments. r=erahm
NSPR_LOG_MODULES is deprecated.
MozReview-Commit-ID: GgJTpEHyZqJ
--- a/dom/base/ThirdPartyUtil.cpp
+++ b/dom/base/ThirdPartyUtil.cpp
@@ -16,17 +16,17 @@
#include "nsIScriptObjectPrincipal.h"
#include "nsIURI.h"
#include "nsThreadUtils.h"
#include "mozilla/Logging.h"
NS_IMPL_ISUPPORTS(ThirdPartyUtil, mozIThirdPartyUtil)
//
-// NSPR_LOG_MODULES=thirdPartyUtil:5
+// MOZ_LOG=thirdPartyUtil:5
//
static mozilla::LazyLogModule gThirdPartyLog("thirdPartyUtil");
#undef LOG
#define LOG(args) MOZ_LOG(gThirdPartyLog, mozilla::LogLevel::Debug, args)
nsresult
ThirdPartyUtil::Init()
{
--- a/dom/camera/DOMCameraManager.cpp
+++ b/dom/camera/DOMCameraManager.cpp
@@ -34,18 +34,18 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMCameraManager)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMCameraManager)
/**
* Global camera logging object
*
- * Set the NSPR_LOG_MODULES environment variable to enable logging
- * in a debug build, e.g. NSPR_LOG_MODULES=Camera:5
+ * Set the MOZ_LOG environment variable to enable logging
+ * in a debug build, e.g. MOZ_LOG=Camera:5
*/
LogModule*
GetCameraLog()
{
static LazyLogModule sLog("Camera");
return sLog;
}
--- a/dom/media/systemservices/LoadManager.cpp
+++ b/dom/media/systemservices/LoadManager.cpp
@@ -13,17 +13,17 @@
#include "nsString.h"
#include "nsThreadUtils.h"
#include "nsReadableUtils.h"
#include "nsIObserverService.h"
#include "mozilla/Telemetry.h"
#include "mozilla/ArrayUtils.h"
-// NSPR_LOG_MODULES=LoadManager:5
+// MOZ_LOG=LoadManager:5
mozilla::LazyLogModule gLoadManagerLog("LoadManager");
#undef LOG
#undef LOG_ENABLED
#define LOG(args) MOZ_LOG(gLoadManagerLog, mozilla::LogLevel::Debug, args)
#define LOG_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, mozilla::LogLevel::Verbose)
namespace mozilla {
--- a/dom/media/systemservices/LoadMonitor.cpp
+++ b/dom/media/systemservices/LoadMonitor.cpp
@@ -50,17 +50,17 @@
#endif
#ifdef XP_WIN
#include <pdh.h>
#include <tchar.h>
#pragma comment(lib, "pdh.lib")
#endif
-// NSPR_LOG_MODULES=LoadManager:5
+// MOZ_LOG=LoadManager:5
#undef LOG
#undef LOG_ENABLED
#define LOG(args) MOZ_LOG(gLoadManagerLog, mozilla::LogLevel::Debug, args)
#define LOG_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, mozilla::LogLevel::Debug)
#define LOG_MANY_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, mozilla::LogLevel::Verbose)
namespace mozilla {
--- a/dom/media/systemservices/OpenSLESProvider.cpp
+++ b/dom/media/systemservices/OpenSLESProvider.cpp
@@ -6,17 +6,17 @@
#include "OpenSLESProvider.h"
#include "mozilla/Logging.h"
#include "nsDebug.h"
#include <dlfcn.h>
#include <SLES/OpenSLES_Android.h>
#include <SLES/OpenSLES_AndroidConfiguration.h>
-// NSPR_LOG_MODULES=OpenSLESProvider:5
+// MOZ_LOG=OpenSLESProvider:5
#undef LOG
#undef LOG_ENABLED
mozilla::LazyLogModule gOpenSLESProviderLog("OpenSLESProvider");
#define LOG(args) MOZ_LOG(gOpenSLESProviderLog, mozilla::LogLevel::Debug, args)
#define LOG_ENABLED() MOZ_LOG_TEST(gOpenSLESProviderLog, mozilla::LogLevel::Debug)
namespace mozilla {
--- a/dom/network/TCPSocketParent.cpp
+++ b/dom/network/TCPSocketParent.cpp
@@ -30,17 +30,17 @@ DeserializeArrayBuffer(JSContext* aCx,
JS::MutableHandle<JS::Value> aVal);
} // namespace IPC
namespace mozilla {
namespace net {
//
-// set NSPR_LOG_MODULES=TCPSocket:5
+// set MOZ_LOG=TCPSocket:5
//
extern LazyLogModule gTCPSocketLog;
#define TCPSOCKET_LOG(args) MOZ_LOG(gTCPSocketLog, LogLevel::Debug, args)
#define TCPSOCKET_LOG_ENABLED() MOZ_LOG_TEST(gTCPSocketLog, LogLevel::Debug)
} // namespace net
namespace dom {
--- a/dom/network/UDPSocket.h
+++ b/dom/network/UDPSocket.h
@@ -14,17 +14,17 @@
#include "mozilla/dom/SocketCommonBinding.h"
#include "nsIUDPSocket.h"
#include "nsIUDPSocketChild.h"
#include "nsTArray.h"
struct JSContext;
//
-// set NSPR_LOG_MODULES=UDPSocket:5
+// set MOZ_LOG=UDPSocket:5
//
namespace mozilla {
namespace net {
extern LazyLogModule gUDPSocketLog;
#define UDPSOCKET_LOG(args) MOZ_LOG(gUDPSocketLog, LogLevel::Debug, args)
#define UDPSOCKET_LOG_ENABLED() MOZ_LOG_TEST(gUDPSocketLog, LogLevel::Debug)
} // namespace net
--- a/dom/plugins/base/nsPluginLogging.h
+++ b/dom/plugins/base/nsPluginLogging.h
@@ -12,40 +12,40 @@
#ifndef PLUGIN_LOGGING // allow external override
#define PLUGIN_LOGGING 1 // master compile-time switch for pluging logging
#endif
////////////////////////////////////////////////////////////////////////////////
// Basic Plugin Logging Usage Instructions
//
-// 1. Set this environment variable: NSPR_LOG_MODULES=<name>:<level>
+// 1. Set this environment variable: MOZ_LOG=<name>:<level>
// Choose the <name> and <level> from this list (no quotes):
// Log Names <name>
#define NPN_LOG_NAME "PluginNPN"
#define NPP_LOG_NAME "PluginNPP"
#define PLUGIN_LOG_NAME "Plugin"
// Levels <level>
#define PLUGIN_LOG_ALWAYS mozilla::LogLevel::Error
#define PLUGIN_LOG_BASIC mozilla::LogLevel::Info
#define PLUGIN_LOG_NORMAL mozilla::LogLevel::Debug
#define PLUGIN_LOG_NOISY mozilla::LogLevel::Verbose
// 2. You can combine logs and levels by separating them with a comma:
-// My favorite Win32 Example: SET NSPR_LOG_MODULES=Plugin:5,PluginNPP:5,PluginNPN:5
+// My favorite Win32 Example: SET MOZ_LOG=Plugin:5,PluginNPP:5,PluginNPN:5
// 3. Instead of output going to the console, you can log to a file. Additionally, set the
-// NSPR_LOG_FILE environment variable to point to the full path of a file.
-// My favorite Win32 Example: SET NSPR_LOG_FILE=c:\temp\pluginLog.txt
+// MOZ_LOG_FILE environment variable to point to the full path of a file.
+// My favorite Win32 Example: SET MOZ_LOG_FILE=c:\temp\pluginLog.txt
-// 4. For complete information see the NSPR Reference:
-// http://www.mozilla.org/projects/nspr/reference/html/prlog.html
+// 4. For complete information see the Gecko Developer guide:
+// https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Gecko_Logging
#ifdef PLUGIN_LOGGING
class nsPluginLogging
{
public:
static mozilla::LazyLogModule gNPNLog; // 4.x NP API, calls into navigator
--- a/dom/presentation/PresentationLog.h
+++ b/dom/presentation/PresentationLog.h
@@ -3,17 +3,17 @@
/* 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 mozilla_dom_PresentationLog_h
#define mozilla_dom_PresentationLog_h
/*
- * NSPR_LOG_MODULES=Presentation:5
+ * MOZ_LOG=Presentation:5
* For detail, see PresentationService.cpp
*/
namespace mozilla {
namespace dom {
extern mozilla::LazyLogModule gPresentationLog;
}
}
--- a/dom/xul/templates/nsXULTemplateBuilder.cpp
+++ b/dom/xul/templates/nsXULTemplateBuilder.cpp
@@ -8,17 +8,17 @@
Builds content from a datasource using the XUL <template> tag.
TO DO
. Fix ContentTagTest's location in the network construction
To turn on logging for this module, set:
- NSPR_LOG_MODULES nsXULTemplateBuilder:5
+ MOZ_LOG=nsXULTemplateBuilder:5
*/
#include "nsCOMPtr.h"
#include "nsCRT.h"
#include "nsIContent.h"
#include "nsIDOMElement.h"
#include "nsIDOMNode.h"
--- a/widget/gonk/nativewindow/GonkNativeWindowICS.cpp
+++ b/widget/gonk/nativewindow/GonkNativeWindowICS.cpp
@@ -21,17 +21,17 @@
#include "mozilla/layers/ImageBridgeChild.h"
#include "mozilla/layers/ShadowLayers.h"
#include "mozilla/layers/ShadowLayerUtilsGralloc.h"
#include "GonkNativeWindow.h"
#include "nsDebug.h"
/**
* DOM_CAMERA_LOGI() is enabled in debug builds, and turned on by setting
- * NSPR_LOG_MODULES=Camera:N environment variable, where N >= 3.
+ * MOZ_LOG=Camera:N environment variable, where N >= 3.
*
* CNW_LOGE() is always enabled.
*/
#define CNW_LOGD(...) DOM_CAMERA_LOGI(__VA_ARGS__)
#define CNW_LOGE(...) {(void)printf_stderr(__VA_ARGS__);}
using namespace android;
using namespace mozilla;