Bug 274855

Summary: DATA_LOG_TO_FILE_TEMP_DIR is broken and confusing to use
Product: WebKit Reporter: Marcus Plutowski <marcus_plutowski>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Trivial CC: mark.lam, webkit-bug-importer
Priority: P4 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Marcus Plutowski 2024-05-29 12:47:01 PDT
rdar://128959048

WTF includes a facility for logging to a file in wtf/DataLog.cpp, controlled by the DATA_LOG_TO_FILE macro.

When DATA_LOG_TO_FILE and DATA_LOG_TO_FILE_TEMP_DIR are set, we get a compiler warning due to casting a string literal to a char* (rather than a const char*). Moreover, the options associated with it are inconsistent: DATA_LOG_TO_FILE/DATA_LOG_TO_FILE_TEMP_DIR are set to 0/1 but DATA_LOG_FILENAME must be commented out, and the overlaps between them (which overrides which, which depends on which) are not immediately clear.

DATA_LOG_TO_FILE also by default logs to /tmp/… even on Windows, which does not work.
Comment 1 Marcus Plutowski 2024-05-29 13:13:09 PDT
Pull request: https://github.com/WebKit/WebKit/pull/29242
Comment 2 EWS 2024-05-30 17:13:17 PDT
Committed 279552@main (183b8fe2f0c1): <https://commits.webkit.org/279552@main>

Reviewed commits have been landed. Closing PR #29242 and removing active labels.