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

@@ -195,7 +195,7 @@ HTMLTrackElement::LoadResource()
nsCOMPtr<nsIURI> uri;
nsresult rv = NewURIFromString(src, getter_AddRefs(uri));
NS_ENSURE_TRUE_VOID(NS_SUCCEEDED(rv));
LOG(PR_LOG_INFO, ("%p Trying to load from src=%s", this,
LOG(LogLevel::Info, ("%p Trying to load from src=%s", this,
NS_ConvertUTF16toUTF8(src).get()));
if (mChannel) {
@@ -246,7 +246,7 @@ HTMLTrackElement::LoadResource()
NS_ENSURE_TRUE_VOID(NS_SUCCEEDED(rv));
channel->SetNotificationCallbacks(mListener);
LOG(PR_LOG_DEBUG, ("opening webvtt channel"));
LOG(LogLevel::Debug, ("opening webvtt channel"));
rv = channel->AsyncOpen(mListener, nullptr);
NS_ENSURE_TRUE_VOID(NS_SUCCEEDED(rv));
@@ -269,7 +269,7 @@ HTMLTrackElement::BindToTree(nsIDocument* aDocument,
return NS_OK;
}
LOG(PR_LOG_DEBUG, ("Track Element bound to tree."));
LOG(LogLevel::Debug, ("Track Element bound to tree."));
if (!aParent || !aParent->IsNodeOfType(nsINode::eMEDIA)) {
return NS_OK;
}
@@ -281,7 +281,7 @@ HTMLTrackElement::BindToTree(nsIDocument* aDocument,
HTMLMediaElement* media = static_cast<HTMLMediaElement*>(aParent);
// TODO: separate notification for 'alternate' tracks?
media->NotifyAddedSource();
LOG(PR_LOG_DEBUG, ("Track element sent notification to parent."));
LOG(LogLevel::Debug, ("Track element sent notification to parent."));
mMediaParent->RunInStableState(
NS_NewRunnableMethod(this, &HTMLTrackElement::LoadResource));