RESOLVED FIXED 234525
Make it possible to enable log channels in WebKitTestRunner and DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=234525
Summary Make it possible to enable log channels in WebKitTestRunner and DumpRenderTree
Simon Fraser (smfr)
Reported 2021-12-20 13:31:47 PST
Make it possible to enable log channels in WebKitTestRunner and DumpRenderTree
Attachments
Patch (10.95 KB, patch)
2021-12-20 13:34 PST, Simon Fraser (smfr)
wenson_hsieh: review+
ews-feeder: commit-queue-
Patch (10.95 KB, patch)
2021-12-20 13:53 PST, Simon Fraser (smfr)
ews-feeder: commit-queue-
Patch (12.91 KB, patch)
2021-12-20 14:31 PST, Simon Fraser (smfr)
no flags
Simon Fraser (smfr)
Comment 1 2021-12-20 13:34:10 PST
Wenson Hsieh
Comment 2 2021-12-20 13:42:21 PST
Comment on attachment 447629 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447629&action=review > Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm:124 > + [[NSUserDefaults standardUserDefaults] setValue:[NSString stringWithUTF8String:options.webCoreLogChannels.c_str()] forKey:@"WebKitLogging"]; This should be `options.webKitLogChannels.c_str()`.
Simon Fraser (smfr)
Comment 3 2021-12-20 13:53:25 PST
Simon Fraser (smfr)
Comment 4 2021-12-20 14:31:27 PST
Sam Weinig
Comment 5 2021-12-20 15:02:11 PST
Comment on attachment 447629 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447629&action=review > Tools/DumpRenderTree/mac/DumpRenderTree.mm:1008 > + {"WebCoreLogging", required_argument, nullptr, 'W'}, The other options use dashes between words. For consistency, how about -webcore-logging? > Tools/WebKitTestRunner/Options.cpp:155 > +static bool handleOptionLogChannels(Options& options, const char* option, const char* channels) Can you move this above the `handleOptionUnmatched` function? I think It makes sense to keep that one last. > Tools/WebKitTestRunner/Options.cpp:194 > + optionList.append(Option("--WebCoreLogging", "Enable WebCore log channels", handleOptionLogChannels, true)); > + optionList.append(Option("--WebKitLogging", "Enable WebKit log channels", handleOptionLogChannels, true)); Same comment as about. Can we keep these consistent as well? Also, I would recommend just using two different functions rather than reparsing.
Simon Fraser (smfr)
Comment 6 2021-12-20 17:31:46 PST
Radar WebKit Bug Importer
Comment 7 2021-12-20 17:32:17 PST
Note You need to log in before you can comment on or make changes to this bug.