mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1219482: Replace PRLogModuleInfo with LazyLogModule in uriloader subdirectory.r=erahm
This commit is contained in:
parent
2ed26c8df4
commit
98f171e09f
@ -50,7 +50,7 @@ static NS_DEFINE_CID(kThisImplCID, NS_THIS_DOCLOADER_IMPL_CID);
|
||||
// this enables LogLevel::Debug level information and places all output in
|
||||
// the file nspr.log
|
||||
//
|
||||
PRLogModuleInfo* gDocLoaderLog = nullptr;
|
||||
mozilla::LazyLogModule gDocLoaderLog("DocLoader");
|
||||
|
||||
|
||||
#if defined(DEBUG)
|
||||
@ -115,10 +115,6 @@ nsDocLoader::nsDocLoader()
|
||||
mDontFlushLayout(false),
|
||||
mIsFlushingLayout(false)
|
||||
{
|
||||
if (nullptr == gDocLoaderLog) {
|
||||
gDocLoaderLog = PR_NewLogModule("DocLoader");
|
||||
}
|
||||
|
||||
ClearInternalProgress();
|
||||
|
||||
MOZ_LOG(gDocLoaderLog, LogLevel::Debug,
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
PRLogModuleInfo* nsURILoader::mLog = nullptr;
|
||||
mozilla::LazyLogModule nsURILoader::mLog("URILoader");
|
||||
|
||||
#define LOG(args) MOZ_LOG(nsURILoader::mLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ERROR(args) MOZ_LOG(nsURILoader::mLog, mozilla::LogLevel::Error, args)
|
||||
@ -753,9 +753,6 @@ nsDocumentOpenInfo::TryContentListener(nsIURIContentListener* aListener,
|
||||
|
||||
nsURILoader::nsURILoader()
|
||||
{
|
||||
if (!mLog) {
|
||||
mLog = PR_NewLogModule("URILoader");
|
||||
}
|
||||
}
|
||||
|
||||
nsURILoader::~nsURILoader()
|
||||
|
@ -49,9 +49,9 @@ protected:
|
||||
nsCOMArray<nsIWeakReference> m_listeners;
|
||||
|
||||
/**
|
||||
* NSPR logging. The module is called "URILoader"
|
||||
* Logging. The module is called "URILoader"
|
||||
*/
|
||||
static PRLogModuleInfo* mLog;
|
||||
static mozilla::LazyLogModule mLog;
|
||||
|
||||
friend class nsDocumentOpenInfo;
|
||||
};
|
||||
|
@ -122,7 +122,7 @@ enum {
|
||||
, NS_FOLDER_VALUE_CUSTOM = 2
|
||||
};
|
||||
|
||||
PRLogModuleInfo* nsExternalHelperAppService::mLog = nullptr;
|
||||
LazyLogModule nsExternalHelperAppService::mLog("HelperAppService");
|
||||
|
||||
// Using level 3 here because the OSHelperAppServices use a log level
|
||||
// of LogLevel::Debug (4), and we want less detailed output here
|
||||
@ -661,12 +661,6 @@ nsresult nsExternalHelperAppService::Init()
|
||||
if (!obs)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (!mLog) {
|
||||
mLog = PR_NewLogModule("HelperAppService");
|
||||
if (!mLog)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
nsresult rv = obs->AddObserver(this, "profile-before-change", true);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
return obs->AddObserver(this, "last-pb-context-exited", true);
|
||||
|
@ -146,7 +146,7 @@ protected:
|
||||
* where level should be 2 for errors, 3 for debug messages from the cross-
|
||||
* platform nsExternalHelperAppService, and 4 for os-specific debug messages.
|
||||
*/
|
||||
static PRLogModuleInfo* mLog;
|
||||
static mozilla::LazyLogModule mLog;
|
||||
|
||||
// friend, so that it can access the nspr log module.
|
||||
friend class nsExternalAppHandler;
|
||||
|
@ -46,7 +46,7 @@ using mozilla::dom::ContentChild;
|
||||
// this enables LogLevel::Debug level information and places all output in
|
||||
// the file offlineupdate.log
|
||||
//
|
||||
extern PRLogModuleInfo *gOfflineCacheUpdateLog;
|
||||
extern mozilla::LazyLogModule gOfflineCacheUpdateLog;
|
||||
|
||||
#undef LOG
|
||||
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, mozilla::LogLevel::Debug, args)
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
//
|
||||
// To enable logging (see prlog.h for full details):
|
||||
// To enable logging (see mozilla/Logging.h for full details):
|
||||
//
|
||||
// set NSPR_LOG_MODULES=nsOfflineCacheUpdate:5
|
||||
// set NSPR_LOG_FILE=offlineupdate.log
|
||||
@ -23,7 +23,7 @@
|
||||
// this enables LogLevel::Info level information and places all output in
|
||||
// the file offlineupdate.log
|
||||
//
|
||||
extern PRLogModuleInfo *gOfflineCacheUpdateLog;
|
||||
extern mozilla::LazyLogModule gOfflineCacheUpdateLog;
|
||||
|
||||
#undef LOG
|
||||
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, mozilla::LogLevel::Debug, args)
|
||||
|
@ -31,7 +31,7 @@ using mozilla::dom::TabParent;
|
||||
// this enables LogLevel::Debug level information and places all output in
|
||||
// the file offlineupdate.log
|
||||
//
|
||||
extern PRLogModuleInfo *gOfflineCacheUpdateLog;
|
||||
extern mozilla::LazyLogModule gOfflineCacheUpdateLog;
|
||||
|
||||
#undef LOG
|
||||
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, mozilla::LogLevel::Debug, args)
|
||||
|
@ -61,7 +61,7 @@ static const int32_t kCustomProfileQuota = 512000;
|
||||
// this enables LogLevel::Debug level information and places all output in
|
||||
// the file offlineupdate.log
|
||||
//
|
||||
extern PRLogModuleInfo *gOfflineCacheUpdateLog;
|
||||
extern LazyLogModule gOfflineCacheUpdateLog;
|
||||
|
||||
#undef LOG
|
||||
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, mozilla::LogLevel::Debug, args)
|
||||
|
@ -78,7 +78,7 @@ typedef mozilla::docshell::OfflineCacheUpdateGlue OfflineCacheUpdateGlue;
|
||||
// this enables LogLevel::Debug level information and places all output in
|
||||
// the file offlineupdate.log
|
||||
//
|
||||
PRLogModuleInfo *gOfflineCacheUpdateLog;
|
||||
LazyLogModule gOfflineCacheUpdateLog("nsOfflineCacheUpdate");
|
||||
|
||||
#undef LOG
|
||||
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, mozilla::LogLevel::Debug, args)
|
||||
@ -262,9 +262,6 @@ nsOfflineCacheUpdateService::~nsOfflineCacheUpdateService()
|
||||
nsresult
|
||||
nsOfflineCacheUpdateService::Init()
|
||||
{
|
||||
if (!gOfflineCacheUpdateLog)
|
||||
gOfflineCacheUpdateLog = PR_NewLogModule("nsOfflineCacheUpdate");
|
||||
|
||||
// Observe xpcom-shutdown event
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
mozilla::services::GetObserverService();
|
||||
|
@ -36,7 +36,7 @@
|
||||
using namespace mozilla;
|
||||
|
||||
//
|
||||
// To enable logging (see prlog.h for full details):
|
||||
// To enable logging (see mozilla/Logging.h for full details):
|
||||
//
|
||||
// set NSPR_LOG_MODULES=nsPrefetch:5
|
||||
// set NSPR_LOG_FILE=prefetch.log
|
||||
@ -44,7 +44,7 @@ using namespace mozilla;
|
||||
// this enables LogLevel::Debug level information and places all output in
|
||||
// the file http.log
|
||||
//
|
||||
static PRLogModuleInfo *gPrefetchLog;
|
||||
static LazyLogModule gPrefetchLog("nsPrefetch");
|
||||
|
||||
#undef LOG
|
||||
#define LOG(args) MOZ_LOG(gPrefetchLog, mozilla::LogLevel::Debug, args)
|
||||
@ -343,9 +343,6 @@ nsPrefetchService::~nsPrefetchService()
|
||||
nsresult
|
||||
nsPrefetchService::Init()
|
||||
{
|
||||
if (!gPrefetchLog)
|
||||
gPrefetchLog = PR_NewLogModule("nsPrefetch");
|
||||
|
||||
nsresult rv;
|
||||
|
||||
// read prefs and hook up pref observer
|
||||
|
Loading…
Reference in New Issue
Block a user