Closed Bug 1219466 Opened 4 years ago Closed 4 years ago

Replace PRLogModuleInfo usage with LazyLogModule in network/

Categories

(Core :: Networking, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox44 --- affected
firefox45 --- fixed

People

(Reporter: erahm, Assigned: mcmanus)

References

Details

Attachments

(1 file)

This covers replacing PRLogModuleInfo w/ LazyLogModule in the 'network/' directory.

Current usage:
> ./netwerk/base/BackgroundFileSaver.cpp:114:    prlog = PR_NewLogModule("BackgroundFileSaver");
> ./netwerk/base/CaptivePortalService.cpp:105:    gCaptivePortalLog = PR_NewLogModule("CaptivePortalService");
> ./netwerk/base/nsAsyncRedirectVerifyHelper.cpp:22:        sLog = PR_NewLogModule("nsRedirect");
> ./netwerk/base/nsAsyncStreamCopier.cpp:74:        gStreamCopierLog = PR_NewLogModule("nsStreamCopier");
> ./netwerk/base/nsAutodialWin.cpp:66:        gLog = PR_NewLogModule("Autodial");
> ./netwerk/base/nsChannelClassifier.cpp:56:        gChannelClassifierLog = PR_NewLogModule("nsChannelClassifier");
> ./netwerk/base/nsDirectoryIndexStream.cpp:48:        gLog = PR_NewLogModule("nsDirectoryIndexStream");
> ./netwerk/base/nsInputStreamPump.cpp:49:        gStreamPumpLog = PR_NewLogModule("nsStreamPump");
> ./netwerk/base/nsLoadGroup.cpp:123:        gLoadGroupLog = PR_NewLogModule("LoadGroup");
> ./netwerk/base/nsPACMan.cpp:779:        sLog = PR_NewLogModule("proxy");
> ./netwerk/base/nsRequestObserverProxy.cpp:178:        gRequestObserverProxyLog = PR_NewLogModule("nsRequestObserverProxy");
> ./netwerk/base/nsSecCheckWrapChannel.cpp:16:    gChannelWrapperPRLog = PR_NewLogModule("ChannelWrapper");
> ./netwerk/base/nsSocketTransportService2.cpp:114:    gSocketTransportLog = PR_NewLogModule("nsSocketTransport");
> ./netwerk/base/nsSocketTransportService2.cpp:115:    gUDPSocketLog = PR_NewLogModule("UDPSocket");
> ./netwerk/base/nsStandardURL.cpp:256:        gStandardURLLog = PR_NewLogModule("nsStandardURL");
> ./netwerk/base/Predictor.cpp:325:  gPredictorLog = PR_NewLogModule("NetworkPredictor");
> ./netwerk/cache/nsCache.cpp:24:    gCacheLog = PR_NewLogModule("cache");
> ./netwerk/cache2/CacheLog.cpp:23:    sLog = PR_NewLogModule("cache2");
> ./netwerk/cookie/nsCookieService.cpp:192:    sCookieLog = PR_NewLogModule("cookie");
> ./netwerk/dns/GetAddrInfo.cpp:26:static PRLogModuleInfo *gGetAddrInfoLog = PR_NewLogModule("GetAddrInfo");
> ./netwerk/dns/mdns/libmdns/MDNSResponderOperator.cpp:31:  static PRLogModuleInfo* log = PR_NewLogModule("MDNSResponderOperator");
> ./netwerk/dns/nsHostResolver.cpp:1462:        gHostResolverLog = PR_NewLogModule("nsHostResolver");
> ./netwerk/protocol/ftp/nsFtpProtocolHandler.cpp:71:        gFTPLog = PR_NewLogModule("nsFtp");
> ./netwerk/protocol/http/nsHttpHandler.cpp:218:    gHttpLog = PR_NewLogModule("nsHttp");
> ./netwerk/protocol/http/PackagedAppService.cpp:1046:  gPASLog = PR_NewLogModule("PackagedAppService");
> ./netwerk/protocol/res/SubstitutingProtocolHandler.cpp:110:    gResLog = PR_NewLogModule("nsResProtocol");
> ./netwerk/protocol/rtsp/controller/RtspControllerChild.cpp:73:    gRtspChildLog = PR_NewLogModule("nsRtspChild");
> ./netwerk/protocol/rtsp/controller/RtspControllerParent.cpp:65:    gRtspLog = PR_NewLogModule("nsRtsp");
> ./netwerk/protocol/websocket/BaseWebSocketChannel.cpp:33:    webSocketLog = PR_NewLogModule("nsWebSocket");
> ./netwerk/protocol/websocket/WebSocketChannelParent.cpp:37:    webSocketLog = PR_NewLogModule("nsWebSocket");
> ./netwerk/protocol/wyciwyg/nsWyciwygProtocolHandler.cpp:26:    gWyciwygLog = PR_NewLogModule("nsWyciwygChannel");
> ./netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp:29:    gWyciwygLog = PR_NewLogModule("nsWyciwygChannel");
> ./netwerk/sctp/datachannel/DataChannel.cpp:59:    sLog = PR_NewLogModule("DataChannel");
> ./netwerk/sctp/datachannel/DataChannel.cpp:68:    sLog = PR_NewLogModule("SCTP");
> ./netwerk/socket/nsSOCKSIOLayer.cpp:1311:        gSOCKSLog = PR_NewLogModule("SOCKS");
> ./netwerk/streamconv/converters/nsFTPDirListingConv.cpp:199:        gFTPDirListConvLog = PR_NewLogModule("nsFTPDirListingConv");
> ./netwerk/system/linux/nsNotifyAddrListener_Linux.cpp:353:        gNotifyAddrLog = PR_NewLogModule("nsNotifyAddr");
> ./netwerk/system/mac/nsNetworkLinkService.mm:129:        gNotifyAddrLog = PR_NewLogModule("nsNotifyAddr");
> ./netwerk/system/win32/nsNotifyAddrListener.cpp:252:        gNotifyAddrLog = PR_NewLogModule("nsNotifyAddr");
> ./netwerk/test/TestBlockingSocket.cpp:108:        gTestLog = PR_NewLogModule("Test");
> ./netwerk/test/TestIOThreads.cpp:60:    gTestLog = PR_NewLogModule("Test");
> ./netwerk/test/TestOverlappedIO.cpp:232:    gTestSocketIOLog = PR_NewLogModule("TestSocketIO");
> ./netwerk/test/TestProtocols.cpp:837:    gTestLog = PR_NewLogModule("Test");
> ./netwerk/test/TestServ.cpp:123:    gTestLog = PR_NewLogModule("Test");
> ./netwerk/test/TestSocketIO.cpp:226:    gTestSocketIOLog = PR_NewLogModule("TestSocketIO");
> ./netwerk/test/TestSocketTransport.cpp:223:        gTestLog = PR_NewLogModule("Test");
> ./netwerk/test/TestStreamLoader.cpp:54:  gTestLog = PR_NewLogModule("Test");
> ./netwerk/test/TestStreamPump.cpp:154:        gTestLog = PR_NewLogModule("Test");
> ./netwerk/test/TestStreamTransport.cpp:281:        gTestLog = PR_NewLogModule("Test");
> ./netwerk/test/TestUpload.cpp:113:    gTestLog = PR_NewLogModule("Test");
> ./netwerk/wifi/nsWifiMonitor.cpp:35:  gWifiMonitorLog = PR_NewLogModule("WifiMonitor");
> ./netwerk/wifi/nsWifiMonitorGonk.cpp:34:  gWifiMonitorLog = PR_NewLogModule("WifiMonitor");
Attachment #8682183 - Flags: review?(valentin.gosu)
Assignee: nobody → mcmanus
Status: NEW → ASSIGNED
I didn't do the c++ test cases - that can be done separately if someone sees value.
Comment on attachment 8682183 [details] [diff] [review]
convert netwerk to LazyLogModule

Review of attachment 8682183 [details] [diff] [review]:
-----------------------------------------------------------------

Except one small nit, it all looks great. No problems or typos that I could see.

::: netwerk/sctp/datachannel/DataChannel.cpp
@@ +80,5 @@
>    DataChannelShutdown() {}
>  
>    void Init()
>      {
> +

nit: Whitespace only change.
Attachment #8682183 - Flags: review?(valentin.gosu) → review+
https://hg.mozilla.org/mozilla-central/rev/bb906bd012a2
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Blocks: 1221194
(In reply to Patrick McManus [:mcmanus] from comment #4)
> I didn't do the c++ test cases - that can be done separately if someone sees
> value.

Thank you for taking this on Patrick. Can you add a follow up for the C++ tests? While I agree they are less important, if they are run under TSan they may still generate thread safety warnings.
removing the b2g 2.5 flag since this commit has been reverted due to an incorrect merge, sorry for the confusion
Duplicate of this bug: 632007
Eric: FYI searchfox not only shows the remaining PR_LogPrint() calls in DataChannel taken of in bug 1367578, but apparently some more in security/manager/ssl/nsNTLMAuthModule.cpp http://searchfox.org/mozilla-central/search?q=PR_LogPrint&path=
You need to log in before you can comment on or make changes to this bug.