Skip to content

[flutter_tools] allow filtering of adb logcat by "flutter" to be configured from CLI args #120711

Closed

Description

@christopherfujino

ADB logcat logs are very verbose, so we filter it by lines that contain the pattern 'flutter'. We should make this configurable via a command-line flag, so that developers who want to debug the full logs can see this. This would also be leveraged by editor plugins, since--for example--Android Studio provides a UI for viewing full logcat logs in a natively launched application.

cc @jacob314

Activity

  1. added
    in triagePresently being triaged by the triage team
    c: new featureNothing broken; request for a new capability
    toolAffects the "flutter" command-line tool. See also t: labels.
    c: proposalA detailed proposal for a change to Flutter
    and removed
    in triagePresently being triaged by the triage team
    on Feb 15, 2023
  2. DanTup commented on Feb 15, 2023

    @DanTup
    Contributor

    If the volume of traffic is high, there may be value in allowing it to be stopped/started while the app is running (via a message to the flutter run daemon, or over the a VM Service extension).

    This could allow the user to start the log, perform some action in the app, then stop the log, rather than having to wade through large amounts of logging.

  3. lukehutch commented on Mar 14, 2023

    @lukehutch
    Contributor

    Some logcat lines don't contain the string flutter (unless that part of the line has already been suppressed):

    D/EGL_emulation( 4571): app_time_stats: avg=39.67ms min=0.97ms max=650.57ms count=26
    

    This debug line in particular really pollutes the log.

    The prefix gives the log level: D/ is debug, W/ is warning, E/ is error. So in addition to the proposal of enabling or disabling the filter for logcat lines containing flutter, I suggest also allowing the user to set a minimum loglevel.

  4. added
    P2Important issues not at the top of the work list
    triaged-toolTriaged by Flutter Tool team
    on Jul 17, 2023
  5. LoveriusB commented on Aug 10, 2023

    @LoveriusB
  6. matanlurey commented on Oct 10, 2024

    @matanlurey
    Contributor

    Fwiw, I looked into this briefly today.

    ADB logcat logs are very verbose, so we filter it by lines that contain the pattern 'flutter'.

    ... is not totally true - there are two branches:

    • Current app process (i.e. your flutter app): virtually no filtering
    • Another process (i.e. another app, possibly Flutter): filtering based on things like flutter

    The vast majority of so-called log-spam (e.g. D/EGL_emulation) are in the current process ID, meaning its not filtered.

    I am very supportive to adding much more liberal adb logcat filtering, similar to what we did in the engine:

    https://github.com/flutter/engine/blob/main/testing/scenario_app/bin/utils/adb_logcat_filtering.dart

    ... however that is a potentially larger change. If the tool team is supportive of more aggressive Android filtering, I'd be happy to contribute here; removing triaged-tool to get an opinion before moving forward.

  7. bkonyi commented on Oct 15, 2024

    @bkonyi
    Contributor

    I'm all for reducing log spam but I don't have enough context to know whether or not it's safe to filter more aggressively. Is there a situation where we wouldn't want these logs filtered? Maybe @reidbaker will have a stronger opinion on this.

  8. 3 remaining items

  9. added
    team-androidOwned by Android platform team
    fyi-toolFor the attention of Flutter Tool team
    and removed
    team-toolOwned by Flutter Tool team
    on Jul 11, 2025
  10. added 2 commits that reference this issue on May 13, 2026
  11. added a commit that references this issue on Aug 27, 2026
    477ca01
  12. github-actions commented on Sep 10, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  13. locked as resolved and limited conversation to collaborators on Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterteam-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions