mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1219482: Replace PRLogModuleInfo with LazyLogModule in toolkit subdirectory.r=erahm
This commit is contained in:
parent
25babf4ea8
commit
2ed26c8df4
@ -78,7 +78,7 @@ using safe_browsing::ClientDownloadRequest_SignatureInfo;
|
||||
#define PREF_BLOCK_UNCOMMON "browser.safebrowsing.downloads.remote.block_uncommon"
|
||||
|
||||
// NSPR_LOG_MODULES=ApplicationReputation:5
|
||||
PRLogModuleInfo *ApplicationReputationService::prlog = nullptr;
|
||||
mozilla::LazyLogModule ApplicationReputationService::prlog("ApplicationReputation");
|
||||
#define LOG(args) MOZ_LOG(ApplicationReputationService::prlog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(ApplicationReputationService::prlog, mozilla::LogLevel::Debug)
|
||||
|
||||
@ -1155,9 +1155,6 @@ ApplicationReputationService::GetSingleton()
|
||||
|
||||
ApplicationReputationService::ApplicationReputationService()
|
||||
{
|
||||
if (!prlog) {
|
||||
prlog = PR_NewLogModule("ApplicationReputation");
|
||||
}
|
||||
LOG(("Application reputation service started up"));
|
||||
}
|
||||
|
||||
|
@ -14,11 +14,11 @@
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsString.h"
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
class nsIRequest;
|
||||
class PendingDBLookup;
|
||||
class PendingLookup;
|
||||
struct PRLogModuleInfo;
|
||||
|
||||
class ApplicationReputationService final :
|
||||
public nsIApplicationReputationService {
|
||||
@ -39,7 +39,7 @@ private:
|
||||
/**
|
||||
* NSPR_LOG_MODULES=ApplicationReputation:5
|
||||
*/
|
||||
static PRLogModuleInfo* prlog;
|
||||
static mozilla::LazyLogModule prlog;
|
||||
/**
|
||||
* This is a singleton, so disallow construction.
|
||||
*/
|
||||
|
@ -132,16 +132,8 @@ private:
|
||||
nsString mChangedResource;
|
||||
};
|
||||
|
||||
static PRLogModuleInfo* GetFileWatcherContextLog()
|
||||
{
|
||||
static PRLogModuleInfo *gNativeWatcherPRLog;
|
||||
if (!gNativeWatcherPRLog) {
|
||||
gNativeWatcherPRLog = PR_NewLogModule("NativeFileWatcherService");
|
||||
}
|
||||
return gNativeWatcherPRLog;
|
||||
}
|
||||
|
||||
#define FILEWATCHERLOG(...) MOZ_LOG(GetFileWatcherContextLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
static mozilla::LazyLogModule gNativeWatcherPRLog("NativeFileWatcherService");
|
||||
#define FILEWATCHERLOG(...) MOZ_LOG(gNativeWatcherPRLog, mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
// The number of notifications to store within WatchedResourceDescriptor:mNotificationBuffer.
|
||||
// If the buffer overflows, its contents are discarded and a change callback is dispatched
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierDbService:5
|
||||
extern PRLogModuleInfo *gUrlClassifierDbServiceLog;
|
||||
extern mozilla::LazyLogModule gUrlClassifierDbServiceLog;
|
||||
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug)
|
||||
|
||||
|
@ -93,7 +93,7 @@
|
||||
#define STORE_SUFFIX ".sbstore"
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierDbService:5
|
||||
extern PRLogModuleInfo *gUrlClassifierDbServiceLog;
|
||||
extern mozilla::LazyLogModule gUrlClassifierDbServiceLog;
|
||||
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug)
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
#define PREFIXSET_SUFFIX ".pset"
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierDbService:5
|
||||
extern PRLogModuleInfo *gUrlClassifierDbServiceLog;
|
||||
extern mozilla::LazyLogModule gUrlClassifierDbServiceLog;
|
||||
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug)
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "nsUrlClassifierUtils.h"
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierProtocolParser:5
|
||||
PRLogModuleInfo *gUrlClassifierProtocolParserLog = nullptr;
|
||||
mozilla::LazyLogModule gUrlClassifierProtocolParserLog("UrlClassifierProtocolParser");
|
||||
#define PARSER_LOG(args) MOZ_LOG(gUrlClassifierProtocolParserLog, mozilla::LogLevel::Debug, args)
|
||||
|
||||
namespace mozilla {
|
||||
@ -77,10 +77,6 @@ ProtocolParser::~ProtocolParser()
|
||||
nsresult
|
||||
ProtocolParser::Init(nsICryptoHash* aHasher)
|
||||
{
|
||||
if (!gUrlClassifierProtocolParserLog) {
|
||||
gUrlClassifierProtocolParserLog =
|
||||
PR_NewLogModule("UrlClassifierProtocolParser");
|
||||
}
|
||||
mCryptoHash = aHasher;
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ using namespace mozilla;
|
||||
using namespace mozilla::safebrowsing;
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierDbService:5
|
||||
PRLogModuleInfo *gUrlClassifierDbServiceLog = nullptr;
|
||||
LazyLogModule gUrlClassifierDbServiceLog("UrlClassifierDbService");
|
||||
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug)
|
||||
|
||||
@ -1161,8 +1161,6 @@ nsUrlClassifierDBService::ReadTablesFromPrefs()
|
||||
nsresult
|
||||
nsUrlClassifierDBService::Init()
|
||||
{
|
||||
if (!gUrlClassifierDbServiceLog)
|
||||
gUrlClassifierDbServiceLog = PR_NewLogModule("UrlClassifierDbService");
|
||||
MOZ_ASSERT(NS_IsMainThread(), "Must initialize DB service on main thread");
|
||||
nsCOMPtr<nsIXULRuntime> appInfo = do_GetService("@mozilla.org/xre/app-info;1");
|
||||
if (appInfo) {
|
||||
|
@ -29,7 +29,7 @@
|
||||
using namespace mozilla;
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierPrefixSet:5
|
||||
static const PRLogModuleInfo *gUrlClassifierPrefixSetLog = nullptr;
|
||||
static LazyLogModule gUrlClassifierPrefixSetLog("UrlClassifierPrefixSet");
|
||||
#define LOG(args) MOZ_LOG(gUrlClassifierPrefixSetLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierPrefixSetLog, mozilla::LogLevel::Debug)
|
||||
|
||||
@ -44,8 +44,6 @@ nsUrlClassifierPrefixSet::nsUrlClassifierPrefixSet()
|
||||
, mTotalPrefixes(0)
|
||||
, mMemoryReportPath()
|
||||
{
|
||||
if (!gUrlClassifierPrefixSetLog)
|
||||
gUrlClassifierPrefixSetLog = PR_NewLogModule("UrlClassifierPrefixSet");
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -28,7 +28,7 @@ static const char* gQuitApplicationMessage = "quit-application";
|
||||
#undef LOG
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierStreamUpdater:5
|
||||
static const PRLogModuleInfo *gUrlClassifierStreamUpdaterLog = nullptr;
|
||||
static mozilla::LazyLogModule gUrlClassifierStreamUpdaterLog("UrlClassifierStreamUpdater");
|
||||
#define LOG(args) MOZ_LOG(gUrlClassifierStreamUpdaterLog, mozilla::LogLevel::Debug, args)
|
||||
|
||||
// This class does absolutely nothing, except pass requests onto the DBService.
|
||||
@ -41,8 +41,6 @@ nsUrlClassifierStreamUpdater::nsUrlClassifierStreamUpdater()
|
||||
: mIsUpdating(false), mInitialized(false), mDownloadError(false),
|
||||
mBeganStream(false), mChannel(nullptr)
|
||||
{
|
||||
if (!gUrlClassifierStreamUpdaterLog)
|
||||
gUrlClassifierStreamUpdaterLog = PR_NewLogModule("UrlClassifierStreamUpdater");
|
||||
LOG(("nsUrlClassifierStreamUpdater init [this=%p]", this));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user