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

@@ -29,6 +29,10 @@
#include "nsXPCOMCIDInternal.h"
#include "nsUnicharInputStream.h"
#include "mozilla/Logging.h"
using mozilla::LogLevel;
#define kExpatSeparatorChar 0xFFFF
static const char16_t kUTF16[] = { 'U', 'T', 'F', '-', '1', '6', '\0' };
@@ -1058,7 +1062,7 @@ nsExpatDriver::ConsumeToken(nsScanner& aScanner, bool& aFlushTokens)
nsScannerIterator end;
aScanner.EndReading(end);
MOZ_LOG(GetExpatDriverLog(), PR_LOG_DEBUG,
MOZ_LOG(GetExpatDriverLog(), LogLevel::Debug,
("Remaining in expat's buffer: %i, remaining in scanner: %i.",
mExpatBuffered, Distance(start, end)));
@@ -1079,7 +1083,7 @@ nsExpatDriver::ConsumeToken(nsScanner& aScanner, bool& aFlushTokens)
length = 0;
if (blocked) {
MOZ_LOG(GetExpatDriverLog(), PR_LOG_DEBUG,
MOZ_LOG(GetExpatDriverLog(), LogLevel::Debug,
("Resuming Expat, will parse data remaining in Expat's "
"buffer.\nContent of Expat's buffer:\n-----\n%s\n-----\n",
NS_ConvertUTF16toUTF8(currentExpatPosition.get(),
@@ -1088,7 +1092,7 @@ nsExpatDriver::ConsumeToken(nsScanner& aScanner, bool& aFlushTokens)
else {
NS_ASSERTION(mExpatBuffered == Distance(currentExpatPosition, end),
"Didn't pass all the data to Expat?");
MOZ_LOG(GetExpatDriverLog(), PR_LOG_DEBUG,
MOZ_LOG(GetExpatDriverLog(), LogLevel::Debug,
("Last call to Expat, will parse data remaining in Expat's "
"buffer.\nContent of Expat's buffer:\n-----\n%s\n-----\n",
NS_ConvertUTF16toUTF8(currentExpatPosition.get(),
@@ -1099,7 +1103,7 @@ nsExpatDriver::ConsumeToken(nsScanner& aScanner, bool& aFlushTokens)
buffer = start.get();
length = uint32_t(start.size_forward());
MOZ_LOG(GetExpatDriverLog(), PR_LOG_DEBUG,
MOZ_LOG(GetExpatDriverLog(), LogLevel::Debug,
("Calling Expat, will parse data remaining in Expat's buffer and "
"new data.\nContent of Expat's buffer:\n-----\n%s\n-----\nNew "
"data:\n-----\n%s\n-----\n",
@@ -1139,7 +1143,7 @@ nsExpatDriver::ConsumeToken(nsScanner& aScanner, bool& aFlushTokens)
mExpatBuffered += length - consumed;
if (BlockedOrInterrupted()) {
MOZ_LOG(GetExpatDriverLog(), PR_LOG_DEBUG,
MOZ_LOG(GetExpatDriverLog(), LogLevel::Debug,
("Blocked or interrupted parser (probably for loading linked "
"stylesheets or scripts)."));
@@ -1200,7 +1204,7 @@ nsExpatDriver::ConsumeToken(nsScanner& aScanner, bool& aFlushTokens)
aScanner.SetPosition(currentExpatPosition, true);
aScanner.Mark();
MOZ_LOG(GetExpatDriverLog(), PR_LOG_DEBUG,
MOZ_LOG(GetExpatDriverLog(), LogLevel::Debug,
("Remaining in expat's buffer: %i, remaining in scanner: %i.",
mExpatBuffered, Distance(currentExpatPosition, end)));