| 112 | | * [https://github.com/WebKit/WebKit/blob/main/Introduction.md#logging-in-webkit Logging in WebKit] |
| | 112 | |
| | 113 | WebKit has two logging features, `LOG` and `dataLog`. |
| | 114 | |
| | 115 | `LOG` is documented at [https://github.com/WebKit/WebKit/blob/main/Introduction.md#logging-in-webkit Logging in WebKit]. |
| | 116 | WebCore is using `LOG`. It outputs logs through `stderr` and `OutputDebugString` on Windows. |
| | 117 | |
| | 118 | Console applications such like jsc.exe and UI process of WebKitTestRunner, can use `stderr`. |
| | 119 | GUI applications (MiniBrowser.exe) and child processes can't use `stderr`. |
| | 120 | You have to attach a debugger to see the message of `OutputDebugString`. |
| | 121 | You should use [https://trac.webkit.org/wiki/Debugging%20With%20Visual%20Studio#DebuggingMultipleProcesses Child Process Debugging Power Tool] to get messages of child processes. |
| | 122 | |
| | 123 | `dataLog` has no documents. It output logs through `stderr` or a file. |
| | 124 | It outputs to a file if you set a env var `WTF_DATA_LOG_FILENAME`. |
| | 125 | You have to enable JSC logging by set env vars, for example: |
| | 126 | {{{ |
| | 127 | set JSC_logGC=2 |
| | 128 | }}} |
| | 129 | |