Bug 143938 - Make WTF Logging runtime switchable, starting with WebCore's Network channel
Summary: Make WTF Logging runtime switchable, starting with WebCore's Network channel
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-19 15:52 PDT by Gavin Barraclough
Modified: 2017-02-10 17:29 PST (History)
4 users (show)

See Also:


Attachments
Fix (96.65 KB, patch)
2015-04-19 16:47 PDT, Gavin Barraclough
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.