WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
160768
Rename LOG_ALWAYS
https://bugs.webkit.org/show_bug.cgi?id=160768
Summary
Rename LOG_ALWAYS
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
Details
Formatted Diff
Diff
Patch
(60.86 KB, patch)
2016-08-12 17:44 PDT
,
Keith Rollin
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Keith Rollin
Comment 1
2016-08-11 16:30:58 PDT
Created
attachment 285865
[details]
Patch
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
Created
attachment 285985
[details]
Patch
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.
Top of Page
Format For Printing
XML
Clone This Bug