Bug 160768

Summary: Rename LOG_ALWAYS
Product: WebKit Reporter: Keith Rollin <krollin>
Component: Web Template FrameworkAssignee: Keith Rollin <krollin>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, benjamin, cdumez, cmarcelo, commit-queue, japhet
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Keith Rollin
Reported 2016-08-11 10:30:37 PDT
LOG_ALWAYS and friends should be renamed, given that the first parameter to it is a boolean expression that determines whether or not logging should be performed. The macros are changed as follows: LOG_ALWAYS(bool, format, ...) -> LOG_IF(bool, format, ...) LOG_ALWAYS_ERROR(bool, format, ...) -> LOG_ERROR_IF(bool, format, ...) The following macros are added: LOG_ALWAYS(format, ...) LOG_ERROR_ALWAYS(format, ...) The sites calling these macros are also updated. Macros like: #define DOWNLOAD_LOG_ALWAYS(...) LOG_ALWAYS(isAlwaysOnLoggingAllowed(), __VA_ARGS__) #define DOWNLOAD_LOG_ALWAYS_ERROR(...) LOG_ALWAYS_ERROR(isAlwaysOnLoggingAllowed(), __VA_ARGS__) are changed to: #define LOG_IF_ALLOWED(...) LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__) #define LOG_ERROR_IF_ALLOWED(...) LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__) Thus, instead of having file-specific macros for conditional logging, we have uniformly named macros. This relieves the developer from trying to remember while macros to be used for the specific file they're working in.
Attachments
Patch (58.86 KB, patch)
2016-08-11 16:30 PDT, Keith Rollin
no flags
Patch (60.86 KB, patch)
2016-08-12 17:44 PDT, Keith Rollin
no flags
Keith Rollin
Comment 1 2016-08-11 16:30:58 PDT
Keith Rollin
Comment 2 2016-08-12 16:51:16 PDT
Gavin suggests macro names following the pattern RELEASE_LOG_*. Updating my changes accordingly.
Keith Rollin
Comment 3 2016-08-12 17:44:09 PDT
WebKit Commit Bot
Comment 4 2016-08-15 12:01:31 PDT
Comment on attachment 285985 [details] Patch Clearing flags on attachment: 285985 Committed r204472: <http://trac.webkit.org/changeset/204472>
WebKit Commit Bot
Comment 5 2016-08-15 12:01:35 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.