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-03 15:25:57 -07:00
parent 688326e7e5
commit 900b3ebc4d
370 changed files with 2515 additions and 2481 deletions

View File

@@ -82,7 +82,7 @@ TimerObserverRunnable::Run()
nsresult
TimerThread::Init()
{
MOZ_LOG(GetTimerLog(), PR_LOG_DEBUG,
MOZ_LOG(GetTimerLog(), LogLevel::Debug,
("TimerThread::Init [%d]\n", mInitialized));
if (mInitialized) {
@@ -129,7 +129,7 @@ TimerThread::Init()
nsresult
TimerThread::Shutdown()
{
MOZ_LOG(GetTimerLog(), PR_LOG_DEBUG, ("TimerThread::Shutdown begin\n"));
MOZ_LOG(GetTimerLog(), LogLevel::Debug, ("TimerThread::Shutdown begin\n"));
if (!mThread) {
return NS_ERROR_NOT_INITIALIZED;
@@ -167,7 +167,7 @@ TimerThread::Shutdown()
mThread->Shutdown(); // wait for the thread to die
MOZ_LOG(GetTimerLog(), PR_LOG_DEBUG, ("TimerThread::Shutdown end\n"));
MOZ_LOG(GetTimerLog(), LogLevel::Debug, ("TimerThread::Shutdown end\n"));
return NS_OK;
}
@@ -259,7 +259,7 @@ TimerThread::Run()
RemoveTimerInternal(timer);
timer = nullptr;
MOZ_LOG(GetTimerLog(), PR_LOG_DEBUG,
MOZ_LOG(GetTimerLog(), LogLevel::Debug,
("Timer thread woke up %fms from when it was supposed to\n",
fabs((now - timerRef->mTimeout).ToMilliseconds())));
@@ -341,12 +341,12 @@ TimerThread::Run()
}
}
if (MOZ_LOG_TEST(GetTimerLog(), PR_LOG_DEBUG)) {
if (MOZ_LOG_TEST(GetTimerLog(), LogLevel::Debug)) {
if (waitFor == PR_INTERVAL_NO_TIMEOUT)
MOZ_LOG(GetTimerLog(), PR_LOG_DEBUG,
MOZ_LOG(GetTimerLog(), LogLevel::Debug,
("waiting for PR_INTERVAL_NO_TIMEOUT\n"));
else
MOZ_LOG(GetTimerLog(), PR_LOG_DEBUG,
MOZ_LOG(GetTimerLog(), LogLevel::Debug,
("waiting for %u\n", PR_IntervalToMilliseconds(waitFor)));
}
}