Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj

This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
This commit is contained in:
Eric Rahm
2015-06-01 14:31:01 -07:00
parent da20f8e257
commit 0baf91e33f
368 changed files with 2510 additions and 2476 deletions

View File

@@ -926,7 +926,7 @@ nsDocShell::nsDocShell()
gDocShellLeakLog = PR_NewLogModule("nsDocShellLeak");
}
if (gDocShellLeakLog) {
MOZ_LOG(gDocShellLeakLog, PR_LOG_DEBUG, ("DOCSHELL %p created\n", this));
MOZ_LOG(gDocShellLeakLog, LogLevel::Debug, ("DOCSHELL %p created\n", this));
}
#ifdef DEBUG
@@ -958,7 +958,7 @@ nsDocShell::~nsDocShell()
}
if (gDocShellLeakLog) {
MOZ_LOG(gDocShellLeakLog, PR_LOG_DEBUG, ("DOCSHELL %p destroyed\n", this));
MOZ_LOG(gDocShellLeakLog, LogLevel::Debug, ("DOCSHELL %p destroyed\n", this));
}
#ifdef DEBUG
@@ -1095,7 +1095,7 @@ nsDocShell::GetInterface(const nsIID& aIID, void** aSink)
}
#if defined(DEBUG)
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
MOZ_LOG(gDocShellLog, LogLevel::Debug,
("nsDocShell[%p]: returning app cache container %p",
this, domDoc.get()));
#endif
@@ -1418,10 +1418,10 @@ nsDocShell::LoadURI(nsIURI* aURI,
}
#if defined(DEBUG)
if (MOZ_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDocShellLog, LogLevel::Debug)) {
nsAutoCString uristr;
aURI->GetAsciiSpec(uristr);
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
MOZ_LOG(gDocShellLog, LogLevel::Debug,
("nsDocShell[%p]: loading %s with flags 0x%08x",
this, uristr.get(), aLoadFlags));
}
@@ -1540,7 +1540,7 @@ nsDocShell::LoadURI(nsIURI* aURI,
if (shEntry) {
#ifdef DEBUG
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
MOZ_LOG(gDocShellLog, LogLevel::Debug,
("nsDocShell[%p]: loading from session history", this));
#endif
@@ -1980,7 +1980,7 @@ bool
nsDocShell::SetCurrentURI(nsIURI* aURI, nsIRequest* aRequest,
bool aFireOnLocationChange, uint32_t aLocationFlags)
{
if (gDocShellLeakLog && MOZ_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
if (gDocShellLeakLog && MOZ_LOG_TEST(gDocShellLeakLog, LogLevel::Debug)) {
nsAutoCString spec;
if (aURI) {
aURI->GetSpec(spec);
@@ -5302,7 +5302,7 @@ nsDocShell::LoadErrorPage(nsIURI* aURI, const char16_t* aURL,
nsIChannel* aFailedChannel)
{
#if defined(DEBUG)
if (MOZ_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDocShellLog, LogLevel::Debug)) {
nsAutoCString spec;
aURI->GetSpec(spec);
@@ -5313,7 +5313,7 @@ nsDocShell::LoadErrorPage(nsIURI* aURI, const char16_t* aURL,
chanName.AssignLiteral("<no channel>");
}
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
MOZ_LOG(gDocShellLog, LogLevel::Debug,
("nsDocShell[%p]::LoadErrorPage(\"%s\", \"%s\", {...}, [%s])\n", this,
spec.get(), NS_ConvertUTF16toUTF8(aURL).get(), chanName.get()));
}
@@ -9606,7 +9606,7 @@ nsDocShell::InternalLoad(nsIURI* aURI,
nsresult rv = NS_OK;
mOriginalUriString.Truncate();
if (gDocShellLeakLog && MOZ_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
if (gDocShellLeakLog && MOZ_LOG_TEST(gDocShellLeakLog, LogLevel::Debug)) {
nsAutoCString spec;
if (aURI) {
aURI->GetSpec(spec);
@@ -11165,7 +11165,7 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
NS_PRECONDITION(!aChannel || !aOwner, "Shouldn't have both set");
#if defined(DEBUG)
if (MOZ_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDocShellLog, LogLevel::Debug)) {
nsAutoCString spec;
aURI->GetSpec(spec);
@@ -11176,7 +11176,7 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
chanName.AssignLiteral("<no channel>");
}
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
MOZ_LOG(gDocShellLog, LogLevel::Debug,
("nsDocShell[%p]::OnNewURI(\"%s\", [%s], 0x%x)\n", this, spec.get(),
chanName.get(), aLoadType));
}
@@ -11241,7 +11241,7 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
// XXX This log message is almost useless because |updateSHistory|
// and |updateGHistory| are not correct at this point.
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
MOZ_LOG(gDocShellLog, LogLevel::Debug,
(" shAvailable=%i updateSHistory=%i updateGHistory=%i"
" equalURI=%i\n",
shAvailable, updateSHistory, updateGHistory, equalUri));
@@ -11785,7 +11785,7 @@ nsDocShell::AddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel,
NS_PRECONDITION(!aChannel || !aOwner, "Shouldn't have both set");
#if defined(DEBUG)
if (MOZ_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(gDocShellLog, LogLevel::Debug)) {
nsAutoCString spec;
aURI->GetSpec(spec);
@@ -11796,7 +11796,7 @@ nsDocShell::AddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel,
chanName.AssignLiteral("<no channel>");
}
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
MOZ_LOG(gDocShellLog, LogLevel::Debug,
("nsDocShell[%p]::AddToSessionHistory(\"%s\", [%s])\n",
this, spec.get(), chanName.get()));
}