Skip to content
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

Add customised log filtering for Android #822

Open
freakboy3742 opened this issue Aug 11, 2022 · 0 comments
Open

Add customised log filtering for Android #822

freakboy3742 opened this issue Aug 11, 2022 · 0 comments
Labels
android The issue relates to Android mobile support. enhancement New features, or improvements to existing features.

Comments

@freakboy3742
Copy link
Member

When an app runs on Android, we currently expose all log messages generated by the app. In some circumstances, this can result in excessive logs being displayed.

adb logcat provides the ability to filter the log stream by log level and by component; a user should be able to configure this log level.

Describe the solution you'd like

It should be possible to pass one or more options to briefcase run android to:

  • control the verbosity of the logs that are displayed to the user;
  • exclude log messages from specific components; and/or
  • reduce the output to only specific components

Describe alternatives you've considered

This could be achieved in multiple ways:

  1. Exposing a single option that describes the full string of options passed to the logcat command (e.g., --logcat "-s *:I Python:E). This is the most flexible option, as it exposes any capability of adb logcat.
  2. Exposing a multi-use option to define individual arguments to pass to logcat (e.g., --logcat "-s" --logcat "*:I" --logcat Python:E) This has the flexibility of option (1), but removes the need to parse the filter into individual arguments; however, it is more verbose.
  3. Exposing a high-level --debuglog option that enables/disables a filter to include DEBUG level output. This option requires less expertise on the part of the end-user, but removes considerable flexibility. However, from the perspective of the end user, it's more likely to be aligned with their needs - display "just the important logs" by default, but provide an easy option to get everything else.

Additional context

This is an extension of #821, introduced to address #814.

#821 deliberately adds a filter for EGL_emulation messages because they are excessively verbose; this indicates that there is a some need to filter logs.

@freakboy3742 freakboy3742 added enhancement New features, or improvements to existing features. up-for-grabs android The issue relates to Android mobile support. labels Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android The issue relates to Android mobile support. enhancement New features, or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

1 participant