Bug 224959

Summary: Add `ALWAYS_LOG_WITH_STREAM` macro for easier development/debugging
Product: WebKit Reporter: Devin Rousso <hi>
Component: New BugsAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, benjamin, cdumez, cmarcelo, darin, ews-watchlist, gyuyoung.kim, hi, ryuan.choi, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Devin Rousso 2021-04-22 17:00:29 PDT
It's often very helpful to use existing `operator<<` defined on objects, but annoying to have to copypaste the boilerplate code that creates a `WTF::TextStream` and uses it in a `WTFLogAlways` or wait for a debug build to enable existing `LOG_WITH_STREAM`.
Comment 1 Devin Rousso 2021-04-22 17:04:29 PDT
Created attachment 426867 [details]
Patch
Comment 2 Devin Rousso 2021-04-22 17:06:02 PDT
Comment on attachment 426867 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426867&action=review

> Source/WTF/wtf/Assertions.h:592
> +#define ALWAYS_LOG_WITH_STREAM(commands) do { \

I'd love to add an `ALWAYS_LOG` and `ALWAYS_LOG_IF` as well, but those are both already defined in `wtf/LoggerHelper.h`.

Maybe I should rename this to `WTF_ALWAYS_LOG_WITH_STREAM` instead so that I can add those without worrying about a name conflict?
Comment 3 EWS 2021-04-25 14:45:58 PDT
Committed r276574 (237010@main): <https://commits.webkit.org/237010@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426867 [details].
Comment 4 Radar WebKit Bug Importer 2021-04-25 14:46:16 PDT
<rdar://problem/77127701>