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 22:17:33 -07:00
parent fa69f724ae
commit f5003d5120
368 changed files with 2511 additions and 2477 deletions

View File

@@ -320,23 +320,23 @@ NS_DebugBreak(uint32_t aSeverity, const char* aStr, const char* aExpr,
InitLog();
FixedBuffer buf;
PRLogModuleLevel ll = PR_LOG_WARNING;
mozilla::LogLevel ll = LogLevel::Warning;
const char* sevString = "WARNING";
switch (aSeverity) {
case NS_DEBUG_ASSERTION:
sevString = "###!!! ASSERTION";
ll = PR_LOG_ERROR;
ll = LogLevel::Error;
break;
case NS_DEBUG_BREAK:
sevString = "###!!! BREAK";
ll = PR_LOG_ERROR;
ll = LogLevel::Error;
break;
case NS_DEBUG_ABORT:
sevString = "###!!! ABORT";
ll = PR_LOG_ERROR;
ll = LogLevel::Error;
break;
default:
@@ -377,7 +377,7 @@ NS_DebugBreak(uint32_t aSeverity, const char* aStr, const char* aExpr,
// errors on platforms without a debugdlg ring a bell on stderr
#if !defined(XP_WIN)
if (ll != PR_LOG_WARNING) {
if (ll != LogLevel::Warning) {
fprintf(stderr, "\07");
}
#endif