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:
@@ -65,7 +65,7 @@ nsresult
|
||||
nsNativeModuleLoader::Init()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread(), "Startup not on main thread?");
|
||||
LOG(PR_LOG_DEBUG, ("nsNativeModuleLoader::Init()"));
|
||||
LOG(LogLevel::Debug, ("nsNativeModuleLoader::Init()"));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ nsNativeModuleLoader::LoadModule(FileLocation& aFile)
|
||||
|
||||
if (mLibraries.Get(hashedFile, &data)) {
|
||||
NS_ASSERTION(data.mModule, "Corrupt mLibraries hash");
|
||||
LOG(PR_LOG_DEBUG,
|
||||
LOG(LogLevel::Debug,
|
||||
("nsNativeModuleLoader::LoadModule(\"%s\") - found in cache",
|
||||
filePath.get()));
|
||||
return data.mModule;
|
||||
@@ -203,13 +203,13 @@ PLDHashOperator
|
||||
nsNativeModuleLoader::UnloaderFunc(nsIHashable* aHashedFile,
|
||||
NativeLoadData& aLoadData, void*)
|
||||
{
|
||||
if (MOZ_LOG_TEST(GetNativeModuleLoaderLog(), PR_LOG_DEBUG)) {
|
||||
if (MOZ_LOG_TEST(GetNativeModuleLoaderLog(), LogLevel::Debug)) {
|
||||
nsCOMPtr<nsIFile> file(do_QueryInterface(aHashedFile));
|
||||
|
||||
nsAutoCString filePath;
|
||||
file->GetNativePath(filePath);
|
||||
|
||||
LOG(PR_LOG_DEBUG,
|
||||
LOG(LogLevel::Debug,
|
||||
("nsNativeModuleLoader::UnloaderFunc(\"%s\")", filePath.get()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user