зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1219482 - Replace PRLogModuleInfo with LazyLogModule in toolkit subdirectory. r=erahm
--HG-- extra : rebase_source : 71c02b7294a95ecba7876b0372a0dee0ea05b4ed
This commit is contained in:
Родитель
1b0525a9d3
Коммит
aff6f586b9
|
@ -72,7 +72,7 @@ using safe_browsing::ClientDownloadRequest_SignatureInfo;
|
|||
#define PREF_DOWNLOAD_ALLOW_TABLE "urlclassifier.downloadAllowTable"
|
||||
|
||||
// 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)
|
||||
|
||||
|
@ -1142,9 +1142,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)
|
||||
|
||||
|
@ -1133,8 +1133,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) {
|
||||
|
|
|
@ -28,7 +28,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)
|
||||
|
||||
|
@ -42,8 +42,6 @@ nsUrlClassifierPrefixSet::nsUrlClassifierPrefixSet()
|
|||
, mMemoryInUse(0)
|
||||
, mMemoryReportPath()
|
||||
{
|
||||
if (!gUrlClassifierPrefixSetLog)
|
||||
gUrlClassifierPrefixSetLog = PR_NewLogModule("UrlClassifierPrefixSet");
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -27,7 +27,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.
|
||||
|
@ -40,8 +40,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));
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче