Bug 1165515 - Part 9: Remove instances of using numeric log levels 1-5. rs=froydnj

This commit is contained in:
Eric Rahm 2015-06-01 22:17:26 -07:00
parent 33fb1cce94
commit 12887bbebe
20 changed files with 52 additions and 52 deletions

View File

@ -22,7 +22,7 @@ PRLogModuleInfo *gLoadManagerLog = nullptr;
#undef LOG
#undef LOG_ENABLED
#define LOG(args) MOZ_LOG(gLoadManagerLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, 5)
#define LOG_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, PR_LOG_VERBOSE)
namespace mozilla {

View File

@ -57,8 +57,8 @@
#undef LOG
#undef LOG_ENABLED
#define LOG(args) MOZ_LOG(gLoadManagerLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, 4)
#define LOG_MANY_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, 5)
#define LOG_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, PR_LOG_DEBUG)
#define LOG_MANY_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, PR_LOG_VERBOSE)
namespace mozilla {

View File

@ -31,7 +31,7 @@ static bool Init()
{
g_LogMod = PR_NewLogModule("xpclog");
g_Spaces = new char[SPACE_COUNT+1];
if (!g_LogMod || !g_Spaces || !MOZ_LOG_TEST(g_LogMod,1)) {
if (!g_LogMod || !g_Spaces || !MOZ_LOG_TEST(g_LogMod,PR_LOG_ERROR)) {
g_InitState = 1;
XPC_Log_Finish();
return false;
@ -71,7 +71,7 @@ XPC_Log_print(const char* fmt, ...)
bool
XPC_Log_Check(int i)
{
return CAN_RUN && MOZ_LOG_TEST(g_LogMod,1);
return CAN_RUN && MOZ_LOG_TEST(g_LogMod,PR_LOG_ERROR);
}
void

View File

@ -52,7 +52,7 @@ static NS_DEFINE_CID(kZipReaderCID, NS_ZIPREADER_CID);
static PRLogModuleInfo *gJarProtocolLog = nullptr;
#define LOG(args) MOZ_LOG(gJarProtocolLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() MOZ_LOG_TEST(gJarProtocolLog, 4)
#define LOG_ENABLED() MOZ_LOG_TEST(gJarProtocolLog, PR_LOG_DEBUG)
//-----------------------------------------------------------------------------
// nsJARInputThunk

View File

@ -35,7 +35,7 @@ namespace net {
// NSPR_LOG_MODULES=BackgroundFileSaver:5
PRLogModuleInfo *BackgroundFileSaver::prlog = nullptr;
#define LOG(args) MOZ_LOG(BackgroundFileSaver::prlog, PR_LOG_DEBUG, args)
#define LOG_ENABLED() MOZ_LOG_TEST(BackgroundFileSaver::prlog, 4)
#define LOG_ENABLED() MOZ_LOG_TEST(BackgroundFileSaver::prlog, PR_LOG_DEBUG)
////////////////////////////////////////////////////////////////////////////////
//// Globals

View File

@ -54,7 +54,7 @@ namespace net {
Predictor *Predictor::sSelf = nullptr;
static PRLogModuleInfo *gPredictorLog = nullptr;
#define PREDICTOR_LOG(args) MOZ_LOG(gPredictorLog, 4, args)
#define PREDICTOR_LOG(args) MOZ_LOG(gPredictorLog, PR_LOG_DEBUG, args)
#define RETURN_IF_FAILED(_rv) \
do { \

View File

@ -474,7 +474,7 @@ protected:
template <class T>
nsresult HttpAsyncAborter<T>::AsyncAbort(nsresult status)
{
MOZ_LOG(gHttpLog, 4,
MOZ_LOG(gHttpLog, PR_LOG_DEBUG,
("HttpAsyncAborter::AsyncAbort [this=%p status=%x]\n", mThis, status));
mThis->mStatus = status;
@ -491,7 +491,7 @@ inline void HttpAsyncAborter<T>::HandleAsyncAbort()
NS_PRECONDITION(!mCallOnResume, "How did that happen?");
if (mThis->mSuspendCount) {
MOZ_LOG(gHttpLog, 4,
MOZ_LOG(gHttpLog, PR_LOG_DEBUG,
("Waiting until resume to do async notification [this=%p]\n", mThis));
mCallOnResume = &T::HandleAsyncAbort;
return;

View File

@ -37,18 +37,18 @@
extern PRLogModuleInfo *gHttpLog;
// http logging
#define LOG1(args) MOZ_LOG(gHttpLog, 1, args)
#define LOG2(args) MOZ_LOG(gHttpLog, 2, args)
#define LOG3(args) MOZ_LOG(gHttpLog, 3, args)
#define LOG4(args) MOZ_LOG(gHttpLog, 4, args)
#define LOG5(args) MOZ_LOG(gHttpLog, 5, args)
#define LOG1(args) MOZ_LOG(gHttpLog, PR_LOG_ERROR, args)
#define LOG2(args) MOZ_LOG(gHttpLog, PR_LOG_WARNING, args)
#define LOG3(args) MOZ_LOG(gHttpLog, PR_LOG_INFO, args)
#define LOG4(args) MOZ_LOG(gHttpLog, PR_LOG_DEBUG, args)
#define LOG5(args) MOZ_LOG(gHttpLog, PR_LOG_VERBOSE, args)
#define LOG(args) LOG4(args)
#define LOG1_ENABLED() MOZ_LOG_TEST(gHttpLog, 1)
#define LOG2_ENABLED() MOZ_LOG_TEST(gHttpLog, 2)
#define LOG3_ENABLED() MOZ_LOG_TEST(gHttpLog, 3)
#define LOG4_ENABLED() MOZ_LOG_TEST(gHttpLog, 4)
#define LOG5_ENABLED() MOZ_LOG_TEST(gHttpLog, 5)
#define LOG1_ENABLED() MOZ_LOG_TEST(gHttpLog, PR_LOG_ERROR)
#define LOG2_ENABLED() MOZ_LOG_TEST(gHttpLog, PR_LOG_WARNING)
#define LOG3_ENABLED() MOZ_LOG_TEST(gHttpLog, PR_LOG_INFO)
#define LOG4_ENABLED() MOZ_LOG_TEST(gHttpLog, PR_LOG_DEBUG)
#define LOG5_ENABLED() MOZ_LOG_TEST(gHttpLog, PR_LOG_VERBOSE)
#define LOG_ENABLED() LOG4_ENABLED()
#endif // HttpLog_h__

View File

@ -54,7 +54,7 @@ public:
private:
virtual ~nsHttpConnectionInfo()
{
MOZ_LOG(gHttpLog, 4, ("Destroying nsHttpConnectionInfo @%x\n", this));
MOZ_LOG(gHttpLog, PR_LOG_DEBUG, ("Destroying nsHttpConnectionInfo @%x\n", this));
}
void BuildHashKey();

View File

@ -26,16 +26,16 @@
extern PRLogModuleInfo *gWyciwygLog;
// http logging
#define LOG1(args) MOZ_LOG(gWyciwygLog, 1, args)
#define LOG2(args) MOZ_LOG(gWyciwygLog, 2, args)
#define LOG3(args) MOZ_LOG(gWyciwygLog, 3, args)
#define LOG4(args) MOZ_LOG(gWyciwygLog, 4, args)
#define LOG1(args) MOZ_LOG(gWyciwygLog, PR_LOG_ERROR, args)
#define LOG2(args) MOZ_LOG(gWyciwygLog, PR_LOG_WARNING, args)
#define LOG3(args) MOZ_LOG(gWyciwygLog, PR_LOG_INFO, args)
#define LOG4(args) MOZ_LOG(gWyciwygLog, PR_LOG_DEBUG, args)
#define LOG(args) LOG4(args)
#define LOG1_ENABLED() MOZ_LOG_TEST(gWyciwygLog, 1)
#define LOG2_ENABLED() MOZ_LOG_TEST(gWyciwygLog, 2)
#define LOG3_ENABLED() MOZ_LOG_TEST(gWyciwygLog, 3)
#define LOG4_ENABLED() MOZ_LOG_TEST(gWyciwygLog, 4)
#define LOG1_ENABLED() MOZ_LOG_TEST(gWyciwygLog, PR_LOG_ERROR)
#define LOG2_ENABLED() MOZ_LOG_TEST(gWyciwygLog, PR_LOG_WARNING)
#define LOG3_ENABLED() MOZ_LOG_TEST(gWyciwygLog, PR_LOG_INFO)
#define LOG4_ENABLED() MOZ_LOG_TEST(gWyciwygLog, PR_LOG_DEBUG)
#define LOG_ENABLED() LOG4_ENABLED()
#define WYCIWYG_TYPE "text/html"

View File

@ -49,7 +49,7 @@ GetSSSLog()
return gSSSLog;
}
#define SSSLOG(args) MOZ_LOG(GetSSSLog(), 4, args)
#define SSSLOG(args) MOZ_LOG(GetSSSLog(), PR_LOG_DEBUG, args)
////////////////////////////////////////////////////////////////////////////////

View File

@ -128,8 +128,8 @@ PRLogModuleInfo* nsExternalHelperAppService::mLog = nullptr;
// of PR_LOG_DEBUG (4), and we want less detailed output here
// Using 3 instead of PR_LOG_WARN because we don't output warnings
#undef LOG
#define LOG(args) MOZ_LOG(nsExternalHelperAppService::mLog, 3, args)
#define LOG_ENABLED() MOZ_LOG_TEST(nsExternalHelperAppService::mLog, 3)
#define LOG(args) MOZ_LOG(nsExternalHelperAppService::mLog, PR_LOG_INFO, args)
#define LOG_ENABLED() MOZ_LOG_TEST(nsExternalHelperAppService::mLog, PR_LOG_INFO)
static const char NEVER_ASK_FOR_SAVE_TO_DISK_PREF[] =
"browser.helperApps.neverAsk.saveToDisk";

View File

@ -48,10 +48,10 @@ using mozilla::dom::ContentChild;
extern PRLogModuleInfo *gOfflineCacheUpdateLog;
#undef LOG
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, 4, args)
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, PR_LOG_DEBUG, args)
#undef LOG_ENABLED
#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, 4)
#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, PR_LOG_DEBUG)
namespace mozilla {
namespace docshell {

View File

@ -26,10 +26,10 @@
extern PRLogModuleInfo *gOfflineCacheUpdateLog;
#undef LOG
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, 4, args)
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, PR_LOG_DEBUG, args)
#undef LOG_ENABLED
#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, 4)
#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, PR_LOG_DEBUG)
namespace mozilla {
namespace docshell {

View File

@ -29,10 +29,10 @@ using mozilla::dom::TabParent;
extern PRLogModuleInfo *gOfflineCacheUpdateLog;
#undef LOG
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, 4, args)
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, PR_LOG_DEBUG, args)
#undef LOG_ENABLED
#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, 4)
#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, PR_LOG_DEBUG)
namespace mozilla {
namespace docshell {

View File

@ -63,10 +63,10 @@ static const int32_t kCustomProfileQuota = 512000;
extern PRLogModuleInfo *gOfflineCacheUpdateLog;
#undef LOG
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, 4, args)
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, PR_LOG_DEBUG, args)
#undef LOG_ENABLED
#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, 4)
#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, PR_LOG_DEBUG)
class AutoFreeArray {
public:

View File

@ -82,10 +82,10 @@ typedef mozilla::docshell::OfflineCacheUpdateGlue OfflineCacheUpdateGlue;
PRLogModuleInfo *gOfflineCacheUpdateLog;
#undef LOG
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, 4, args)
#define LOG(args) MOZ_LOG(gOfflineCacheUpdateLog, PR_LOG_DEBUG, args)
#undef LOG_ENABLED
#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, 4)
#define LOG_ENABLED() MOZ_LOG_TEST(gOfflineCacheUpdateLog, PR_LOG_DEBUG)
namespace { // anon

View File

@ -44,10 +44,10 @@ using namespace mozilla;
static PRLogModuleInfo *gPrefetchLog;
#undef LOG
#define LOG(args) MOZ_LOG(gPrefetchLog, 4, args)
#define LOG(args) MOZ_LOG(gPrefetchLog, PR_LOG_DEBUG, args)
#undef LOG_ENABLED
#define LOG_ENABLED() MOZ_LOG_TEST(gPrefetchLog, 4)
#define LOG_ENABLED() MOZ_LOG_TEST(gPrefetchLog, PR_LOG_DEBUG)
#define PREFETCH_PREF "network.prefetch-next"

View File

@ -45,10 +45,10 @@ extern PRLogModuleInfo *gWidgetFocusLog;
extern PRLogModuleInfo *gWidgetDragLog;
extern PRLogModuleInfo *gWidgetDrawLog;
#define LOG(args) MOZ_LOG(gWidgetLog, 4, args)
#define LOGFOCUS(args) MOZ_LOG(gWidgetFocusLog, 4, args)
#define LOGDRAG(args) MOZ_LOG(gWidgetDragLog, 4, args)
#define LOGDRAW(args) MOZ_LOG(gWidgetDrawLog, 4, args)
#define LOG(args) MOZ_LOG(gWidgetLog, PR_LOG_DEBUG, args)
#define LOGFOCUS(args) MOZ_LOG(gWidgetFocusLog, PR_LOG_DEBUG, args)
#define LOGDRAG(args) MOZ_LOG(gWidgetDragLog, PR_LOG_DEBUG, args)
#define LOGDRAW(args) MOZ_LOG(gWidgetDrawLog, PR_LOG_DEBUG, args)
#else

View File

@ -29,10 +29,10 @@ extern PRLogModuleInfo *gWidgetFocusLog;
extern PRLogModuleInfo *gWidgetIMLog;
extern PRLogModuleInfo *gWidgetDrawLog;
#define LOG(args) MOZ_LOG(gWidgetLog, 4, args)
#define LOGFOCUS(args) MOZ_LOG(gWidgetFocusLog, 4, args)
#define LOGIM(args) MOZ_LOG(gWidgetIMLog, 4, args)
#define LOGDRAW(args) MOZ_LOG(gWidgetDrawLog, 4, args)
#define LOG(args) MOZ_LOG(gWidgetLog, PR_LOG_DEBUG, args)
#define LOGFOCUS(args) MOZ_LOG(gWidgetFocusLog, PR_LOG_DEBUG, args)
#define LOGIM(args) MOZ_LOG(gWidgetIMLog, PR_LOG_DEBUG, args)
#define LOGDRAW(args) MOZ_LOG(gWidgetDrawLog, PR_LOG_DEBUG, args)
#else