-
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
base: main
Are you sure you want to change the base?
Conversation
EWS run on previous version of this PR (hash 284b9dc) |
Combining this with #47352 makes it much easier to configure which logging channels to enable on Android. |
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. |
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. * Source/JavaScriptCore/jsc.cpp: (main): * Source/WTF/wtf/Assertions.cpp: * Source/WTF/wtf/Assertions.h: * Source/WTF/wtf/Logger.h: (WTF::Logger::willLog const): (WTF::Logger::log): (WTF::Logger::logVerbose): * Source/WTF/wtf/PlatformWPE.cmake: * Source/WTF/wtf/WTFConfig.h: * Source/cmake/FindAndroid.cmake: Added. * Source/cmake/OptionsWPE.cmake:
EWS run on current version of this PR (hash 91c5647) |
Done. Also fixed a couple of instances where Please take a look, this should be good to go now. |
284b9dc
91c5647