Skip to content

Logging: Add a section about setting up on Android #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/Build & Debug/Logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,28 @@ Set the `WEBKIT_DEBUG` environment variable.
WEBKIT_DEBUG=Scrolling Tools/Scripts/run-minibrowser --gtk --debug
```

### Android

The WPE port can be built for Android, where it integrates with the system
`logd` service. The log channel configuration is read from the
`debug.log.WPEWebKit` system property, which can be set using the `setprop`
command line tool:

```sh
adb shell setprop debug.log.WPEWebKit 'WebGL,Media=error'
```

Additionally, the `log.tag.WPEWebKit` property is used to configure a global
filter for all the messages produced by WebKit:

```sh
adb shell setprop log.tag.WPEWebKit VERBOSE
```

The `persist.` prefix may be added to either system property to store the
setting across device reboots.

Comment on lines +103 to +104
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
setting across device reboots.
setting across device reboots, e.g. `adb shell setprop persist.log.tag.WPEWebKit VERBOSE`.
Android logs can then be visualised with `logcat`:
`adb logcat -s WPEWebKit`

(Sorry, I cannot nest code blocks inside suggestions, but the logcat thing should be one)


### macOS

On macOS, you can, for example, enable the `Language` log channel with these terminal commands:
Expand Down