Bug 241719 - Enhance Options::useOSLog to accept an os log type value.
Summary: Enhance Options::useOSLog to accept an os log type value.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
: 241721 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-17 10:56 PDT by Mark Lam
Modified: 2022-06-17 22:21 PDT (History)
9 users (show)

See Also:


Attachments
EWS testing. (12.34 KB, patch)
2022-06-17 14:46 PDT, Mark Lam
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
EWS testing. (13.25 KB, patch)
2022-06-17 17:14 PDT, Mark Lam
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
EWS testing. (13.53 KB, patch)
2022-06-17 19:21 PDT, Mark Lam
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2022-06-17 10:56:50 PDT
This option only applies to OS(DARWIN).

For example, we can now use any of these:
    --useOSLog=default    // logs to OS_LOG_TYPE_DEFAULT
    --useOSLog=info       // logs to OS_LOG_TYPE_INFO
    --useOSLog=debug      // logs to OS_LOG_TYPE_DEBUG
    --useOSLog=error      // logs to OS_LOG_TYPE_ERROR
    --useOSLog=fault.     // logs to OS_LOG_TYPE_FAULT

We can still use --useOSLog=0 or false (which means do the normal dataLog) and --useOSLog=1 or true (which means dataLog to OS_LOG_TYPE_ERROR).

Previously, when we specify --useOSLog=1, we will data log to OS_LOG_TYPE_INFO.  This has been a source of friction in usage because no one ever remembers that we need enable OS_LOG_TYPE_INFO in the log stream  to see this logging.  Instead, --useOSLog=1 will now log to OS_LOG_TYPE_ERROR, which ensures that logging will show up in log stream.  This is fine to do because the --useOSLog=1 option indicates that the client really wants to see the logs.  Otherwise, the client can use one of the other os log types if they want something different.

Secondly, because -useOSLog=1 indicates that the client really wants to see the logs, logging to OS_LOG_TYPE_ERROR ensures that the logging is flushed to the file system instead of sitting in a memory buffer, and potentially not showing up in the log stream.
Comment 1 Mark Lam 2022-06-17 11:25:51 PDT
Pull request: https://github.com/WebKit/WebKit/pull/1598
Comment 2 Mark Lam 2022-06-17 14:46:28 PDT
Created attachment 460312 [details]
EWS testing.
Comment 3 Mark Lam 2022-06-17 17:14:34 PDT
Created attachment 460321 [details]
EWS testing.
Comment 4 Mark Lam 2022-06-17 19:21:09 PDT
Created attachment 460324 [details]
EWS testing.
Comment 5 EWS 2022-06-17 21:27:14 PDT
Committed r295656 (251661@main): <https://commits.webkit.org/251661@main>

Reviewed commits have been landed. Closing PR #1598 and removing active labels.
Comment 6 Radar WebKit Bug Importer 2022-06-17 21:28:13 PDT
<rdar://problem/95433917>
Comment 7 Alexey Proskuryakov 2022-06-17 22:21:07 PDT
*** Bug 241721 has been marked as a duplicate of this bug. ***