flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

Hide logging spam

Open crtl opened this issue 3 years ago • 1 comments

Steps to Reproduce

Using video_player and playing a looped video already results in absurd amounts of log entries to be spammed to run window which make it very hard to use logs in any way to debug apps. Playing video for a few seconds already results in below log output and continues spam every seconds:

D/EGL_emulation( 9372): app_time_stats: avg=46.22ms min=18.98ms max=88.05ms count=22
D/EGL_emulation( 9372): app_time_stats: avg=35.71ms min=16.12ms max=82.16ms count=29
D/EGL_emulation( 9372): app_time_stats: avg=32.37ms min=12.53ms max=52.47ms count=31
D/EGL_emulation( 9372): app_time_stats: avg=35.75ms min=14.30ms max=84.77ms count=28
D/BufferPoolAccessor2.0( 9372): bufferpool2 0x75df94677a18 : 5(10485760 size) total buffers - 1(2097152 size) used buffers - 155/160 (recycle/alloc) - 5/159 (fetch/transfer)
D/EGL_emulation( 9372): app_time_stats: avg=34.60ms min=11.99ms max=59.36ms count=29
D/BufferPoolAccessor2.0( 9372): bufferpool2 0x75df9464af88 : 5(40960 size) total buffers - 0(0 size) used buffers - 23/29 (recycle/alloc) - 6/29 (fetch/transfer)
D/BufferPoolAccessor2.0( 9372): bufferpool2 0x75df9467b888 : 5(10485760 size) total buffers - 0(0 size) used buffers - 17/22 (recycle/alloc) - 5/22 (fetch/transfer)
D/BufferPoolAccessor2.0( 9372): evictor expired: 6, evicted: 2
D/BufferPoolAccessor2.0( 9372): bufferpool2 0x75df946390c8 : 5(40960 size) total buffers - 1(8192 size) used buffers - 257/262 (recycle/alloc) - 5/261 (fetch/transfer)
D/EGL_emulation( 9372): app_time_stats: avg=36.22ms min=19.19ms max=69.18ms count=28
D/EGL_emulation( 9372): app_time_stats: avg=36.79ms min=10.72ms max=69.42ms count=28
D/EGL_emulation( 9372): app_time_stats: avg=35.24ms min=8.81ms max=78.77ms count=28
D/EGL_emulation( 9372): app_time_stats: avg=34.06ms min=11.21ms max=53.46ms count=30
D/BufferPoolAccessor2.0( 9372): bufferpool2 0x75df94677a18 : 5(10485760 size) total buffers - 1(2097152 size) used buffers - 308/313 (recycle/alloc) - 5/312 (fetch/transfer)
D/EGL_emulation( 9372): app_time_stats: avg=36.22ms min=11.17ms max=71.19ms count=28
D/BufferPoolAccessor2.0( 9372): bufferpool2 0x75df946390c8 : 5(40960 size) total buffers - 1(8192 size) used buffers - 508/513 (recycle/alloc) - 5/512 (fetch/transfer)
D/EGL_emulation( 9372): app_time_stats: avg=32.71ms min=20.00ms max=47.96ms count=31
D/EGL_emulation( 9372): app_time_stats: avg=34.48ms min=17.59ms max=62.97ms count=29
D/EGL_emulation( 9372): app_time_stats: avg=36.65ms min=14.33ms max=85.84ms count=28
I/de.chlnge.app( 9372): Background concurrent copying GC freed 9846(1451KB) AllocSpace objects, 4(192KB) LOS objects, 20% free, 93MB/117MB, paused 403us,79us total 132.719ms
D/MediaCodec( 9372): keep callback message for reclaim
I/CCodecConfig( 9372): query failed after returning 19 values (BAD_INDEX)
W/Codec2Client( 9372): query -- param skipped: index = 1342179345.
W/Codec2Client( 9372): query -- param skipped: index = 2415921170.
W/Codec2Client( 9372): query -- param skipped: index = 1610614798.
W/MediaCodec( 9372): mapFormat: no mediaType information
D/EGL_emulation( 9372): app_time_stats: avg=34.33ms min=11.59ms max=67.80ms count=29
D/BufferPoolAccessor2.0( 9372): bufferpool2 0x75df94677a18 : 5(10485760 size) total buffers - 1(2097152 size) used buffers - 468/473 (recycle/alloc) - 5/472 (fetch/transfer)
D/EGL_emulation( 9372): app_time_stats: avg=37.72ms min=13.07ms max=75.92ms count=27
D/BufferPoolAccessor2.0( 9372): bufferpool2 0x75df946390c8 : 5(40960 size) total buffers - 1(8192 size) used buffers - 751/756 (recycle/alloc) - 5/751 (fetch/transfer)
D/EGL_emulation( 9372): app_time_stats: avg=37.47ms min=14.13ms max=71.52ms count=27

Solution:

All output except I/Flutter and developer.log output should be hidden by default and there should be an option in the plugin to enable verbose output if required.

There already was such an option in the past (somewhere in flutter 1 time) but it was removed along the way and now run tab is unbearable especially when the app grows. Sure one can "Fold lines like these" in Android Studio but it still shows "X folded lines" everywhere and is annoying to setup. Browser devtools are also no alternative because they are cumbersome to use and "Logging" tab regularly freezes and crashes browser window on startup and is even worse because "flutter.frame" logs.

Version info

[√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Version 10.0.19044.1826], locale en-DE)
    • Flutter version 3.0.5 at C:\Users\User\fvm\versions\3.0.5
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (2 weeks ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\User\AppData\Local\Android\sdk
    • Platform android-33, build-tools 31.0.0
    • Java binary at: C:\Users\User\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\212.5712.43.2112.8609683\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

crtl avatar Jul 27 '22 17:07 crtl

Thanks for the suggestion. I agree, logging could be improved. I don't know when we will have time to do it, but we'll take a look at what's involved.

stevemessick avatar Aug 01 '22 15:08 stevemessick

This would definitly be a good impovement

mariusvn avatar Nov 29 '22 08:11 mariusvn

I completely agree. The excessive logging generated by video_player when playing a looped video can be overwhelming and make it difficult to effectively use logs for debugging. It can be frustrating when logs are flooded with repetitive and irrelevant information, and it can make it challenging to identify important log entries. It would be helpful for video_player to implement a more streamlined and concise logging system to provide developers with the necessary information without overwhelming them with excessive logs.

kabirnayeem99 avatar Mar 12 '23 10:03 kabirnayeem99