Bug 274855 - DATA_LOG_TO_FILE_TEMP_DIR is broken and confusing to use
Summary: DATA_LOG_TO_FILE_TEMP_DIR is broken and confusing to use
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P4 Trivial
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-05-29 12:47 PDT by Marcus Plutowski
Modified: 2024-05-30 17:13 PDT (History)
2 users (show)

See Also:


Attachments

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