Changeset 275482 in webkit
- Timestamp:
- Apr 5, 2021 7:46:54 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r275150 r275482 1 2021-04-05 Tyler Wilcock <twilco.o@protonmail.com> 2 3 Document how to use logging in WebKit 4 https://bugs.webkit.org/show_bug.cgi?id=224152 5 6 Reviewed by Simon Fraser. 7 8 Add documentation about how to use logging in WebKit. 9 10 * Introduction.md: 11 1 12 2021-03-28 David Kilzer <ddkilzer@apple.com> 2 13 -
trunk/Introduction.md
r273463 r275482 1345 1345 # Logging in WebKit 1346 1346 1347 FIXME: Write this. 1348 1347 Some places in WebKit use a macro called `LOG_WITH_STREAM`. Here's an example invocation: 1348 1349 ``` 1350 LOG_WITH_STREAM(Scrolling, stream << "ScrollingTree::commitTreeState - removing unvisited node " << nodeID); 1351 ``` 1352 1353 The first argument is the _log channel_ and the second is the _log content_. By default, this logging is enabled in 1354 debug builds and disabled in release builds (see definition of `LOG_DISABLED`). 1355 1356 The only logs that will be printed are those whose channels you have enabled. You can specify the channels you want to 1357 enable by constructing a comma-separated list with the following syntax: 1358 1359 * `ChannelName` to enable logging for this channel 1360 * `all` to enable logging for all channels 1361 * `-ChannelName` to disable logging for this channel 1362 1363 Where you specify this list depends on the platform you are running WebKit on. 1364 1365 ### Linux 1366 1367 Set the `WEBKIT_DEBUG` environment variable. 1368 1369 ``` 1370 WEBKIT_DEBUG=Scrolling Tools/Scripts/run-minibrowser --gtk --debug 1371 ``` 1372 1373 ### Mac 1374 1375 Set a value for the `WebCoreLogging` key in [standardUserDefaults](https://developer.apple.com/documentation/foundation/nsuserdefaults/1416603-standarduserdefaults). 1376 1377 You may also pass this key and value as an argument: 1378 1379 ``` 1380 Tools/Scripts/run-minibrowser --debug -WebCoreLogging Scrolling 1381 ``` 1382 1383 or set the key and value on the [NSGlobalDomain](https://developer.apple.com/documentation/foundation/nsglobaldomain). 1384 1385 ``` 1386 defaults write NSGlobalDomain WebCoreLogging -string Scrolling 1387 Tools/Scripts/run-minibrowser --debug 1388 ``` 1389 1390 ### Windows 1391 1392 Set the `WebCoreLogging` environment variable.
Note: See TracChangeset
for help on using the changeset viewer.