-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[WPE] Log messages to the Android log where appropriate #47339
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
aperezdc
wants to merge
1
commit into
WebKit:main
Choose a base branch
from
aperezdc:android-logging
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+207
−6
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
https://bugs.webkit.org/show_bug.cgi?id=295155 Reviewed by NOBODY (OOPS!). Add an Android-specific version of the logging macros. Those use __android_log_print() to get the messages sent to the system log facility. LogChannel is also augmented with calls to the Android logging functions where appropriate. Also, on actual devices Android closes the standard error stream of processes by default, therefore it is handy to have messages send to the standard error stream forwarded to the system log. In all cases, the name of the LogChannel subsystem is set as the Android logging tag, which means that the corresponding system property (i.e. "log.tag.<name>") needs to be set in order for logs to be sent to the system log. This can be achieved for example with the following command using ADB: adb shell setprop log.tag.WPEWebKit VERBOSE Or, to save the setting: adb shell setprop persist.log.tag.WPEWebKit VERBOSE The logging level may be set to VERBOSE, DEBUG, INFO, WARN, ERROR, or FATAL. Those correspond to the log levels defined in <android/log.h>. More information about how to configure the logger can be found at: https://android.googlesource.com/platform/system/core/+/66607ebc0e451/logd/README.property Setting environment variables on Android is a bit of a chore, so in the future it may be desirable to read the list of enabled logging channels from a system property instead.
EWS run on current version of this PR (hash 284b9dc) |
Combining this with #47352 makes it much easier to configure which logging channels to enable on Android. |
spenap
reviewed
Jun 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, this will be very useful 👍 !
This will need a rebase now that #47375 has landed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
284b9dc
284b9dc