Bug 143938

Summary: Make WTF Logging runtime switchable, starting with WebCore's Network channel
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: Web Template FrameworkAssignee: Gavin Barraclough <barraclough>
Status: NEW ---    
Severity: Normal CC: aestes, bburg, commit-queue, ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fix none

Description Gavin Barraclough 2015-04-19 15:52:50 PDT
Currently WTF logging only works in debug builds; it would be useful if it could be enabled in release builds.

Logging should also support severity levels to enable different granularities (with the potential to vary default verbosity by system capabilities and build style).

Adding new logging macro to support level & moving channels incrementally, since some logging may be expensive even when disabled.
Comment 1 Gavin Barraclough 2015-04-19 16:47:39 PDT
Created attachment 251137 [details]
Fix
Comment 2 Gavin Barraclough 2015-04-19 16:49:15 PDT
With the attached patch, Network logging can be enabled in a release build using:

    defaults write com.apple.WebKit.Networking.Development WebCoreLogging 'Network'
Comment 3 WebKit Commit Bot 2015-04-19 16:49:58 PDT
Attachment 251137 [details] did not pass style-queue:


ERROR: Source/WebKit2/Platform/Logging.cpp:35:  JOIN_LOG_CHANNEL_WITH_PREFIX is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/platform/Logging.cpp:36:  JOIN_LOG_CHANNEL_WITH_PREFIX is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Gavin Barraclough 2015-04-20 12:19:53 PDT
Per conversation with Geoff, Geoff likes log level names "Always", "Customer", "Debug".
Comment 5 BJ Burg 2015-11-23 15:17:23 PST
If you rebase this, I'll review it!
Comment 6 BJ Burg 2017-02-10 17:29:24 PST
Comment on attachment 251137 [details]
Fix

Clearing r?, this patch is rotted.