Commit 073d4a98 authored by Patrick McManus's avatar Patrick McManus
Browse files

bug 1219466 - convert netwerk to LazyLogModule r=valentin.gosu

parent ffd079e6
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -9,11 +9,6 @@
#include "base/basictypes.h"
#include "mozilla/Logging.h"

extern PRLogModuleInfo* GetDataChannelLog();
#undef LOG
#define LOG(args) MOZ_LOG(GetDataChannelLog(), mozilla::LogLevel::Debug, args)


#include "nsDOMDataChannelDeclarations.h"
#include "nsDOMDataChannel.h"
#include "nsIDOMDataChannel.h"
@@ -29,6 +24,10 @@ extern PRLogModuleInfo* GetDataChannelLog();
#include "nsIScriptObjectPrincipal.h"

#include "DataChannel.h"
#include "DataChannelLog.h"

#undef LOG
#define LOG(args) MOZ_LOG(mozilla::gDataChannelLog, mozilla::LogLevel::Debug, args)

// Since we've moved the windows.h include down here, we have to explicitly
// undef GetBinaryType, otherwise we'll get really odd conflicts
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ struct JSContext;
//
// set NSPR_LOG_MODULES=UDPSocket:5
//
extern PRLogModuleInfo *gUDPSocketLog;
extern mozilla::LazyLogModule gUDPSocketLog;
#define UDPSOCKET_LOG(args)     MOZ_LOG(gUDPSocketLog, mozilla::LogLevel::Debug, args)
#define UDPSOCKET_LOG_ENABLED() MOZ_LOG_TEST(gUDPSocketLog, mozilla::LogLevel::Debug)

+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ using mozilla::net::gNeckoChild;
//
// set NSPR_LOG_MODULES=UDPSocket:5
//
extern PRLogModuleInfo *gUDPSocketLog;
extern mozilla::LazyLogModule gUDPSocketLog;
#define UDPSOCKET_LOG(args)     MOZ_LOG(gUDPSocketLog, mozilla::LogLevel::Debug, args)
#define UDPSOCKET_LOG_ENABLED() MOZ_LOG_TEST(gUDPSocketLog, mozilla::LogLevel::Debug)

+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
//
// set NSPR_LOG_MODULES=UDPSocket:5
//
extern PRLogModuleInfo *gUDPSocketLog;
extern mozilla::LazyLogModule gUDPSocketLog;
#define UDPSOCKET_LOG(args)     MOZ_LOG(gUDPSocketLog, mozilla::LogLevel::Debug, args)
#define UDPSOCKET_LOG_ENABLED() MOZ_LOG_TEST(gUDPSocketLog, mozilla::LogLevel::Debug)

+3 −5
Original line number Diff line number Diff line
@@ -33,9 +33,9 @@ namespace mozilla {
namespace net {

// NSPR_LOG_MODULES=BackgroundFileSaver:5
PRLogModuleInfo *BackgroundFileSaver::prlog = nullptr;
#define LOG(args) MOZ_LOG(BackgroundFileSaver::prlog, mozilla::LogLevel::Debug, args)
#define LOG_ENABLED() MOZ_LOG_TEST(BackgroundFileSaver::prlog, mozilla::LogLevel::Debug)
static LazyLogModule prlog("BackgroundFileSaver");
#define LOG(args) MOZ_LOG(prlog, mozilla::LogLevel::Debug, args)
#define LOG_ENABLED() MOZ_LOG_TEST(prlog, mozilla::LogLevel::Debug)

////////////////////////////////////////////////////////////////////////////////
//// Globals
@@ -110,8 +110,6 @@ BackgroundFileSaver::BackgroundFileSaver()
, mActualTargetKeepPartial(false)
, mDigestContext(nullptr)
{
  if (!prlog)
    prlog = PR_NewLogModule("BackgroundFileSaver");
  LOG(("Created BackgroundFileSaver [this = %p]", this));
}

Loading