-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[WTF][WPE] Read the log level string from an Android system property #47352
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
[WTF][WPE] Read the log level string from an Android system property #47352
Conversation
EWS run on previous version of this PR (hash f292bc1) |
This is most useful in combination with #47339 in order to have the logging messages sent to the Android logging service. |
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.
Philippe has a valid question, but I'm OK with both your approach and his suggestion. The changes look good!
f292bc1
to
e22246b
Compare
EWS run on previous version of this PR (hash e22246b) |
e22246b
to
6adbad7
Compare
EWS run on previous version of this PR (hash 6adbad7) |
6adbad7
to
6e676d2
Compare
EWS run on previous version of this PR (hash 6e676d2) |
Ping reviewers 🏓 |
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.
I would do this in a separate LoggingAndroid.cpp, because now half of LoggingUnix.cpp is unrelated to Unix. But whatever.
Actually, I am going to do that. It makes little sense in Android anyway to use environment variables (it's quite inconvenient, requires rebuilding the application package with a wrapper script) and I will make it only read the system property at runtime. |
6e676d2
to
55e3a44
Compare
EWS run on previous version of this PR (hash 55e3a44) |
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.
Shouldn't we include the adb command in docs? It's quite useful for developing and it'd be a shame forcing devs to look in the code if they can just see it on a README
My plan was to send a PR to update the page at https://docs.webkit.org/Build%20%26%20Debug/Logging.html but indeed it would be good to have it in the manual. I can do that in a follow-up patch, too. |
55e3a44
to
44383f0
Compare
EWS run on current version of this PR (hash 44383f0) |
Document that the WPE port logs to the logd service on Android, and is configured using system properties, after the two following patches: - WebKit/WebKit#47339 - WebKit/WebKit#47352
Done here for the documentation site: WebKit/Documentation#128 |
https://bugs.webkit.org/show_bug.cgi?id=295175 Reviewed by Nikolas Zimmermann and Michael Catanzaro. Read the value of the debug.WPEWebKit.log system property to determine the value returned by WTF::logLevelString() to configure logging channels on Android. This allows using the "setprop" command line tool to configure logging: adb shell setprop debug.WPEWebKit.log 'Scrolling,Loading' * Source/WTF/wtf/PlatformWPE.cmake: * Source/WTF/wtf/android/LoggingAndroid.cpp: Copied from Source/WTF/wtf/unix/LoggingUnix.cpp. (WTF::logLevelString): * Source/WTF/wtf/unix/LoggingUnix.cpp: Guard with !OS(ANDROID); remove unneeded <string.h> header inclusion, and make logLevel "const" as drive-by fixes. (WTF::logLevelString): Canonical link: https://commits.webkit.org/297467@main
44383f0
to
f8b520c
Compare
Committed 297467@main (f8b520c): https://commits.webkit.org/297467@main Reviewed commits have been landed. Closing PR #47352 and removing active labels. |
Backported into |
Document that the WPE port logs to the logd service on Android, and is configured using system properties, after the two following patches: - WebKit/WebKit#47339 - WebKit/WebKit#47352
f8b520c
44383f0
🧪 wpe-wk2🧪 mac-wk2🧪 mac-AS-debug-wk2🧪 gtk-wk2🛠 mac-safer-cpp