Skip to content

Feature request: Add a flag to flutter run & flutter logs to filter output #50808

Open

Description

@christopherfujino

After #45743, we stopped filtering log output (by the string flutter both because it broke benchmark tasks and because it obscured when the app crashed. The downside is that the logs are much noisier. This should be configurable by a flag.

For more context, see: #50628

Activity

  1. FozanKh commented on Apr 5, 2020

    @FozanKh
  2. jmagman commented on Apr 6, 2020

    @jmagman
  3. changed the title [-]Add a flag to `flutter run` & `flutter logs` to filter output[/-] [+]Feature request: Add a flag to `flutter run` & `flutter logs` to filter output[/+] on Apr 6, 2020
  4. peterkapena commented on Jun 25, 2020

    @peterkapena

    ): setVertexArrayObject: set vao to 0 (0) 1 2
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 1 (1) 1 6
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 0 (0) 1 2
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 1 (1) 1 6
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 0 (0) 1 2
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 1 (1) 1 6
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 0 (0) 1 2
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 1 (1) 1 6
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 0 (0) 1 2
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 1 (1) 1 6
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 0 (0) 1 2
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 1 (1) 1 6
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 0 (0) 1 2
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 1 (1) 1 6
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 0 (0) 1 2
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 1 (1) 1 6
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 0 (0) 1 2
    D/eglCodecCommon(19578): setVertexArrayObject: set vao to 1 (1) 1 6

    Hot to remove these?

  5. madhavtripathi05 commented on Sep 29, 2020

    @madhavtripathi05

    Easy Fix (if you're using VSCode):
    Inside Debug Console you can apply Filters
    e.g. For excluding something you can type !pattern
    in your case !D/egl..

  6. WebSheldon commented on Sep 30, 2020

    @WebSheldon

    we can use the plugin 'Grep Console' on Intellij IDEA to filter the console logs.
    i

  7. GanongLS commented on Feb 8, 2021

    @GanongLS

    Hope this feature release soon, it's so annoying to watch my log so messy.

  8. AdnanKazi commented on Mar 22, 2021

    @AdnanKazi

    @madhavtripathi05 Can I use multiple filters ?

  9. madhavtripathi05 commented on Mar 22, 2021

    @madhavtripathi05

    @madhavtripathi05 Can I use multiple filters ?

    yes you can separated by commas

  10. AdnanKazi commented on Mar 22, 2021

    @AdnanKazi

    Thanks man

    @madhavtripathi05 Can I use multiple filters ?

    yes you can separated by commas

  11. Apollo108 commented on Apr 13, 2021

    @Apollo108

    @madhavtripathi05 I didn't manage to add another filter using comma as a separator, maybe we can configure something here (see acreenshot)? But I don't understand how to do this, I need to filter multiple lines, please, help

    image

  12. 23 remaining items

  13. Nukesor commented on Aug 6, 2023

    @Nukesor

    For all those of you that don't use a editor with a build-in terminal that supports filtering, but rather depend on the commandline, here's a goodie for you:
    your flutter command here | sed '/^\(V\|I\|W\|E\)\/flutter/!d'

    This sed command filters all that annoying stuff and is a pretty neat workaround until there's a proper flutter built-in solution :)

  14. ianselley commented on Oct 4, 2023

    @ianselley

    For all those of you that don't use a editor with a build-in terminal that supports filtering, but rather depend on the commandline, here's a goodie for you: your flutter command here | sed '/^\(V\|I\|W\|E\)\/flutter/!d'

    This sed command filters all that annoying stuff and is a pretty neat workaround until there's a proper flutter built-in solution :)

    Great approach!

    While this works great, I like seeing the first logs while i'm waiting for my flutter app to run. For that I've tweaked your command to:
    flutter run | sed '/^.\// { /^\(V\|I\|W\|E\)\/flutter/!d }'

    This also prints the lines that don't have a "/" in the second position

  15. jordan-castro commented on Jul 5, 2024

    @jordan-castro
  16. reidbaker commented on Aug 14, 2024

    @reidbaker
    Contributor

    @christopherfujino do you have a suggested flag name the android team has someone who is going to look at adding this functionality.

  17. christopherfujino commented on Aug 15, 2024

    @christopherfujino
    ContributorAuthor

    @christopherfujino do you have a suggested flag name the android team has someone who is going to look at adding this functionality.

    Naming things is hard, and I'm particularly bad at it. @jmagman do you have opinions?

  18. jordan-castro commented on Aug 15, 2024

    @jordan-castro

    @reidbaker why not name it "log-filter"

  19. added a commit that references this issue on May 14, 2026
  20. added a commit that references this issue on Jun 18, 2026
    b7f3951
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

    P3Issues that are less important to the Flutter projectplatform-androidAndroid applications specificallyteam-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