如何在没有默认日志消息的情况下在物理 Android 设备上进行“flutter run”?

问题描述 投票:0回答:1

如何在物理 Android 设备上运行

flutter run
,而不会收到 Android 本身的调试日志消息轰炸?当我尝试在 Android 设备上调试代码时,我必须找出自己的日志消息或打印语句,但在物理 iOS 设备上运行我的应用程序时,这些默认调试日志都不会显示。

请注意,我正在使用 VS 代码并通过其上的终端运行

flutter run
。我需要能够从终端运行它。如果有人对这些消息有一个很好的解决方案,那将非常有帮助。

这是我默认隐藏的消息的示例

flutter run

D/FirebaseAuth(27676): Notifying id token listeners about user ( VI1HgxPrdQhAFuXZ95ULH4mMSXp2 ).
I/ExoPlayerImpl(27676): Init 2251360 [ExoPlayerLib/2.18.7] [oriole, Pixel 6, Google, 34]
W/test.test(27676): Accessing hidden method Landroid/media/AudioTrack;->getLatency()I (unsupported, reflection, allowed)
I/Surface (27676): Surface::setFrameRate is deprecated, setFrameRate hint is dropped as destination is not SurfaceFlinger
I/DMCodecAdapterFactory(27676): Creating an asynchronous MediaCodec adapter for track type video
D/CCodec  (27676): allocate(c2.exynos.h264.decoder)
I/Codec2Client(27676): Available Codec2 services: "default" "default1" "default2" "software"
I/CCodec  (27676): setting up 'default' as default (vendor) store
I/CCodec  (27676): Created component [c2.exynos.h264.decoder]
D/CCodecConfig(27676): read media type: video/avc
D/ReflectedParamUpdater(27676): extent() != 1 for single value type: output.subscribed-indices.values
D/ReflectedParamUpdater(27676): extent() != 1 for single value type: input.buffers.allocator-ids.values
D/ReflectedParamUpdater(27676): extent() != 1 for single value type: output.buffers.allocator-ids.values
D/ReflectedParamUpdater(27676): extent() != 1 for single value type: output.buffers.pool-ids.values
D/ReflectedParamUpdater(27676): ignored struct field coded.color-format.locations
D/CCodecConfig(27676): ignoring local param raw.size (0xd2001800) as it is already supported
D/CCodecConfig(27676): ignoring local param default.color (0x5200180b) as it is already supported
D/ReflectedParamUpdater(27676): ignored struct field raw.hdr-static-info.mastering
I/CCodecConfig(27676): query failed after returning 15 values (BAD_INDEX)
D/CCodecConfig(27676): c2 config diff is Dict {
D/CCodecConfig(27676):   c2::u32 algo.low-latency.value = 0
D/CCodecConfig(27676):   c2::i32 algo.priority.value = 0
D/CCodecConfig(27676):   c2::float algo.rate.value = 0
D/CCodecConfig(27676):   c2::u32 coded.pl.level = 20496
D/CCodecConfig(27676):   c2::u32 coded.pl.profile = 20481
D/CCodecConfig(27676):   c2::u32 coded.vui.color.matrix = 0
D/CCodecConfig(27676):   c2::u32 coded.vui.color.primaries = 0
D/CCodecConfig(27676):   c2::u32 coded.vui.color.range = 0
D/CCodecConfig(27676):   c2::u32 coded.vui.color.transfer = 0
D/CCodecConfig(27676):   c2::u32 default.color.matrix = 0
D/CCodecConfig(27676):   c2::u32 default.color.primaries = 0
D/CCodecConfig(27676):   c2::u32 default.color.range = 0
D/CCodecConfig(27676):   c2::u32 default.color.transfer = 0
D/CCodecConfig(27676):   c2::u32 input.buffers.max-size.value = 7340032
D/CCodecConfig(27676):   string input.media-type.value = "video/avc"
D/CCodecConfig(27676):   c2::u32 output.delay.value = 3
D/CCodecConfig(27676):   string output.media-type.value = "video/raw"
D/CCodecConfig(27676):   c2::u32 raw.color.matrix = 0
D/CCodecConfig(27676):   c2::u32 raw.color.primaries = 0
D/CCodecConfig(27676):   c2::u32 raw.color.range = 0
D/CCodecConfig(27676):   c2::u32 raw.color.transfer = 0
D/CCodecConfig(27676):   c2::float raw.hdr-static-info.max-cll = 0
D/CCodecConfig(27676):   c2::float raw.hdr-static-info.max-fall = 0
D/CCodecConfig(27676):   c2::u32 raw.max-size.height = 240
D/CCodecConfig(27676):   c2::u32 raw.max-size.width = 320
D/CCodecConfig(27676):   c2::u32 raw.pixel-format.value = 34
D/CCodecConfig(27676):   c2::i32 raw.rotation.flip = 
W/ColorUtils(27676): expected specified color aspects (0:0:0:0)
I/MediaCodec(27676): MediaCodec will operate in async mode
D/SurfaceUtils(27676): connecting to surface 0xb400006fa379f940, reason connectToSurface
I/MediaCodec(27676): [c2.exynos.h264.decoder] setting surface generation to 28340225
D/SurfaceUtils(27676): disconnecting from surface 0xb400006fa379f940, reason connectToSurface(reconnect)
D/SurfaceUtils(27676): connecting to surface 0xb400006fa379f930, reason connectToSurface(reconnect-with-listener)
D/CCodec  (27676): [c2.exynos.h264.decoder] buffers are bound to CCodec for this session
D/CCodecConfig(27676): no c2 equivalents for log-session-id
D/CCodecConfig(27676): no c2 equivalents for color-standard
D/CCodecConfig(27676): no c2 equivalents for csd-1
D/CCodecConfig(27676): no c2 equivalents for native-window
D/CCodecConfig(27676): no c2 equivalents for native-window-generation
D/CCodecConfig(27676): no c2 equivalents for flags
D/CCodecConfig(27676): c2 config diff is   c2::u32 default.color.matrix = 1
D/CCodecConfig(27676):   c2::u32 default.color.primaries = 1
D/CCodecConfig(27676):   c2::u32 default.color.range = 2
D/CCodecConfig(27676):   c2::u32 default.color.transfer = 3
D/CCodecConfig(27676):   c2::u32 raw.max-size.height = 1280
D/CCodecConfig(27676):   c2::u32 raw.max-size.width = 720
D/CCodecConfig(27676):   c2::u32 raw.size.height = 1280
D/CCodecConfig(27676):   c2::u32 raw.size.width = 720
W/Codec2Client(27676): query -- param skipped: index = 1107298332.
D/CCodec  (27676): client requested max input size 212611, which is smaller than what component recommended (7340032); overriding with component recommendation.
W/CCodec  (27676): This behavior is subject to change. It is recommended that app developers double check whether the requested max input size is in reasonable range.
D/CCodec  (27676): encoding statistics level = 0
D/CCodec  (27676): setup formats input: AMessage(what = 0x00000000) = {
D/CCodec  (27676):   int32_t height = 1280
D/CCodec  (27676):   int32_t level = 65536
D/CCodec  (27676):   int32_t max-input-size = 7340032
D/CCodec  (27676):   string mime = "video/avc"
D/CCodec  (27676):   int32_t priority = 0
D/CCodec  (27676):   int32_t profile = 65536
D/CCodec  (27676):   int32_t width = 720
D/CCodec  (27676):   Rect crop(0, 0, 719, 1279)
D/CCodec  (27676): }
D/CCodec  (27676): setup formats output: AMessage(what = 0x00000000) = {
D/CCodec  (27676):   int32_t android._color-format = 2130708361
D/CCodec  (27676):   int32_t android._video-scaling = 1
D/CCodec  (27676):   int32_t rotation-degrees = 0
D/CCodec  (27676):   int32_t color-standard = 1
D/CCodec  (27676):   int32_t color-range = 2
D/CCodec  (27676):   int32_t color-transfer = 3
D/CCodec  (27676):   float cta861.max-cll = 0.000000
D/CCodec  (27676):   float cta861.max-fall = 0.000000
D/CCodec  (27676):   int32_t sar-height = 1
D/CCodec  (27676):   int32_t sar-width = 1
D/CCodec  (27676):   Rect crop(0, 0, 719, 1279)
D/CCodec  (27676):   int32_t width = 720
D/CCodec  (27676):   int32_t height = 1280
D/CCodec  (27676):   int32_t max-height = 1280
D/CCodec  (27676):   int32_t max-width = 720
D/CCodec  (27676):   string mime = "video/raw"
D/CCodec  (27676):   int32_t priority = 0
D/CCodec  (27676):   int32_t android._dataspace = 260
D/CCodec  (27676):   int32_t color-format = 2130708361
D/CCodec  (27676): }
I/CCodecConfig(27676): query failed after returning 15 values (BAD_INDEX)
D/CCodecConfig(27676): c2 config diff is   c2::u32 raw.color.matrix = 1
D/CCodecConfig(27676):   c2::u32 raw.color.primaries = 1
D/CCodecConfig(27676):   c2::u32 raw.color.range = 2
D/CCodecConfig(27676):   c2::u32 raw.color.transfer = 3
D/MediaCodec(27676): keep callback message for reclaim
W/Codec2Client(27676): query -- param skipped: index = 1073743886.
W/Codec2Client(27676): query -- param skipped: index = 1610614798.
D/C2Store (27676): debug.c2.use_dmabufheaps set, forcing DMABUF Heaps
D/C2Store (27676): Using DMABUF Heaps
D/CCodecBufferChannel(27676): [c2.exynos.h264.decoder#354] Created input block pool with allocatorID 16 => poolID 17 - OK (0)
I/CCodecBufferChannel(27676): [c2.exynos.h264.decoder#354] Created output block pool with allocatorID 18 => poolID 1056 - OK
D/CCodecBufferChannel(27676): [c2.exynos.h264.decoder#354] Configured output block pool ids 1056 => OK
D/Codec2-OutputBufferQueue(27676): remote graphic buffer migration 0/0
D/Codec2Client(27676): setOutputSurface -- failed to set consumer usage (6/BAD_INDEX)
D/Codec2Client(27676): setOutputSurface -- generation=28340225 consumer usage=0x900
D/Codec2Client(27676): Surface configure completed
I/DMABUFHEAPS(27676): Using DMA-BUF heap named: system
I/DMCodecAdapterFactory(27676): Creating an asynchronous MediaCodec adapter for track type audio
D/CCodec  (27676): allocate(c2.android.aac.decoder)
I/CCodec  (27676): setting up 'default' as default (vendor) store
I/CCodec  (27676): Created component [c2.android.aac.decoder]
D/CCodecConfig(27676): read media type: audio/mp4a-latm
D/CCodecConfig(27676): c2 config diff is   c2::u32 output.delay.value = 6
D/ReflectedParamUpdater(27676): extent() != 1 for single value type: algo.buffers.max-count.values
D/Codec2-OutputBufferQueue(27676): set max dequeue count 13 from update
D/ReflectedParamUpdater(27676): extent() != 1 for single value type: output.subscribed-indices.values
D/ReflectedParamUpdater(27676): extent() != 1 for single value type: input.buffers.allocator-ids.values
D/ReflectedParamUpdater(27676): extent() != 1 for single value type: output.buffers.allocator-ids.values
D/ReflectedParamUpdater(27676): extent() != 1 for single value type: algo.buffers.allocator-ids.values
D/ReflectedParamUpdater(27676): extent() != 1 for single value type: output.buffers.pool-ids.values
D/ReflectedParamUpdater(27676): extent() != 1 for single value type: algo.buffers.pool-ids.values
D/CCodecBufferChannel(27676): [c2.exynos.h264.decoder#354] Ignoring stale input buffer done callback: last flush index = 0, frameIndex = 0
D/Codec2-OutputBufferQueue(27676): set max dequeue count 13 from update
D/Codec2-OutputBufferQueue(27676): set max dequeue count 13 from update
I/CCodecConfig(27676): query failed after returning 20 values (BAD_INDEX)
D/CCodecConfig(27676): c2 config diff is Dict {
D/CCodecConfig(27676):   c2::u32 coded.aac-packaging.value = 0
D/CCodecConfig(27676):   c2::u32 coded.bitrate.value = 64000
D/CCodecConfig(27676):   c2::u32 coded.pl.level = 0
D/CCodecConfig(27676):   c2::u32 coded.pl.profile = 8192
D/CCodecConfig(27676):   c2::i32 coding.drc.album-mode.value = 0
D/CCodecConfig(27676):   c2::float coding.drc.attenuation-factor.value = 1
D/CCodecConfig(27676):   c2::float coding.drc.boost-factor.value = 1
D/CCodecConfig(27676):   c2::i32 coding.drc.compression-mode.value = 3
D/CCodecConfig(27676):   c2::i32 coding.drc.effect-type.value = 3
D/CCodecConfig(27676):   c2::float coding.drc.encoded-level.value = 0.25
D/CCodecConfig(27676):   c2::float coding.drc.reference-level.value = -16
D/CCodecConfig(27676):   c2::u32 input.buffers.max-size.value = 8192
D/CCodecConfig(27676):   c2::u32 input.delay.value = 0
D/CCodecConfig(27676):   string input.media-type.value = "audio/mp4a-latm"
D/CCodecConfig(27676):   c2::u32 output.delay.value = 2
D/CCodecConfig(27676):   c2::float output.drc.output-loudness.value = 0.25
D/CCodecConfig(27676):   string output.media-type.value = "audio/raw"
D/CCodecConfig(27676):   c2::u32 raw.channel-count.value = 1
D/CCodecConfig(27676):   c2::u32 raw.channel-mask.value = 0
D/CCodecConfig(27676):   c2::u32 raw.max-channel-count.value = 8
D/CCodecConfig(27676):   c2::u32 raw.sample-rate.value = 44100
D/CCodecConfig(27676): }
I/MediaCodec(27676): MediaCodec will operate in async mode
D/CCodec  (27676): [c2.android.aac.decoder] buffers are bound to CCodec for this session
D/CCodecConfig(27676): no c2 equivalents for log-session-id
D/CCodecConfig(27676): no c2 equivalents for flags
D/CCodecConfig(27676): config failed => CORRUPTED
D/CCodecConfig(27676): c2 config diff is   c2::u32 raw.channel-count.value = 2
W/Codec2Client(27676): query -- param skipped: index = 1107298332.
D/CCodec  (27676): client requested max input size 51, which is smaller than what component recommended (8192); overriding with component recommendation.
W/CCodec  (27676): This behavior is subject to change. It is recommended that app developers double check whether the requested max input size is in reasonable range.
D/CCodec  (27676): encoding statistics level = 0
D/CCodec  (27676): setup formats input: AMessage(what = 0x00000000) = {
D/CCodec  (27676):   int32_t aac-drc-album-mode = 0
D/CCodec  (27676):   int32_t aac-drc-boost-level = 127
D/CCodec  (27676):   int32_t aac-drc-cut-level = 127
D/CCodec  (27676):   int32_t aac-drc-effect-type = 3
D/CCodec  (27676):   int32_t aac-encoded-target-level = -1
D/CCodec  (27676):   int32_t aac-max-output-channel_count = 8
D/CCodec  (27676):   int32_t aac-target-ref-level = 64
D/CCodec  (27676):   int32_t bitrate = 64000
D/CCodec  (27676):   int32_t channel-count = 2
D/CCodec  (27676):   int32_t channel-mask = 0
D/CCodec  (27676):   int32_t level = 0
D/CCodec  (27676):   int32_t max-input-size = 8192
D/CCodec  (27676):   int32_t max-output-channel-count = 8
D/CCodec  (27676):   string mime = "audio/mp4a-latm"
D/CCodec  (27676):   int32_t profile = 2
D/CCodec  (27676):   int32_t sample-rate = 44100
D/CCodec  (27676): }
D/CCodec  (27676): setup formats output: AMessage(what = 0x00000000) = {
D/CCodec  (27676):   int32_t aac-drc-album-mode = 0
D/CCodec  (27676):   int32_t aac-drc-boost-level = 127
D/CCodec  (27676):   int32_t aac-drc-cut-level = 127
D/CCodec  (27676):   int32_t aac-drc-effect-type = 3
D/CCodec  (27676):   int32_t aac-drc-output-loudness = -1
D/CCodec  (27676):   int32_t aac-encoded-target-level = -1
D/CCodec  (27676):   int32_t aac-max-output-channel_count = 8
D/CCodec  (27676):   int32_t aac-target-ref-level = 64
D/CCodec  (27676):   int32_t channel-count = 2
D/CCodec  (27676):   int32_t channel-mask = 0
D/CCodec  (27676):   int32_t max-output-channel-count = 8
D/CCodec  (27676):   string mime = "audio/raw"
D/CCodec  (27676):   int32_t sample-rate = 44100
D/CCodec  (27676):   int32_t android._config-pcm-encoding = 2
D/CCodec  (27676): }
I/CCodecConfig(27676): query failed after returning 20 values (BAD_INDEX)
D/MediaCodec(27676): keep callback message for reclaim
W/Codec2Client(27676): query -- param skipped: index = 1342179345.
W/Codec2Client(27676): query -- param skipped: index = 2415921170.
W/Codec2Client(27676): query -- param skipped: index = 1610614798.
D/CCodecBufferChannel(27676): [c2.android.aac.decoder#428] Created input block pool with allocatorID 16 => poolID 18 - OK (0)
I/CCodecBufferChannel(27676): [c2.android.aac.decoder#428] Created output block pool with allocatorID 16 => poolID 1316 - OK
D/CCodecBufferChannel(27676): [c2.android.aac.decoder#428] Configured output block pool ids 1316 => OK
D/CCodecConfig(27676): c2 config diff is   c2::u32 raw.channel-mask.value = 12
D/CCodecBuffers(27676): [c2.android.aac.decoder#428:Output[N]] popFromStashAndRegister: at 1000000000000us, output format changed to AMessage(what = 0x00000000) = {
D/CCodecBuffers(27676):   int32_t aac-drc-album-mode = 0
D/CCodecBuffers(27676):   int32_t aac-drc-boost-level = 127
D/CCodecBuffers(27676):   int32_t aac-drc-cut-level = 127
D/CCodecBuffers(27676):   int32_t aac-drc-effect-type = 3
D/CCodecBuffers(27676):   int32_t aac-drc-output-loudness = -1
D/CCodecBuffers(27676):   int32_t aac-encoded-target-level = -1
D/CCodecBuffers(27676):   int32_t aac-max-output-channel_count = 8
D/CCodecBuffers(27676):   int32_t aac-target-ref-level = 64
D/CCodecBuffers(27676):   int32_t channel-count = 2
D/CCodecBuffers(27676):   int32_t channel-mask = 12
D/CCodecBuffers(27676):   int32_t max-output-channel-count = 8
D/CCodecBuffers(27676):   string mime = "audio/raw"
D/CCodecBuffers(27676):   int32_t sample-rate = 44100
D/CCodecBuffers(27676):   int32_t android._config-pcm-encoding = 2
D/CCodecBuffers(27676): }
D/CCodecConfig(27676): c2 config diff is   c2::u32 raw.crop.height = 1280
D/CCodecConfig(27676):   c2::u32 raw.crop.left = 0
D/CCodecConfig(27676):   c2::u32 raw.crop.top = 0
D/CCodecConfig(27676):   c2::u32 raw.crop.width = 720
D/FlutterBranchSDK(27676): triggered setupBranch
D/SessionLifecycleClient(27676): Sending lifecycle 2 to service
D/FlutterBranchSDK(27676): triggered onNewIntent
D/SessionLifecycleService(27676): Activity backgrounding at 280678023
D/FlutterBranchSDK(27676): triggered SessionBuilder reInit
D/SessionLifecycleClient(27676): Sending lifecycle 1 to service
D/SessionLifecycleService(27676): Activity foregrounding at 280678035.
D/FlutterBranchSDK(27676): triggered onListen
D/TrafficStats(27676): tagSocket(240) with statsTag=0x66, statsUid=-1
D/FlutterBranchSDK(27676): triggered onInitFinished
D/FlutterBranchSDK(27676): BranchReferralInitListener - params: {"+clicked_branch_link":false,"+is_first_session":false}
W/ziparchive(27676): Unable to open '/data/app/~~fArrmlbfs7VlP4Bi_xEngw==/com.google.android.trichromelibrary_631211833-MxtJDt-3dlC3tO5AZ9y6aw==/base.dm': No such file or directory
W/ziparchive(27676): Unable to open '/data/app/~~fArrmlbfs7VlP4Bi_xEngw==/com.google.android.trichromelibrary_631211833-MxtJDt-3dlC3tO5AZ9y6aw==/base.dm': No such file or directory
W/test.test(27676): Entry not found
D/nativeloader(27676): Configuring clns-5 for other apk /data/app/~~fArrmlbfs7VlP4Bi_xEngw==/com.google.android.trichromelibrary_631211833-MxtJDt-3dlC3tO5AZ9y6aw==/base.apk. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~9kDi2zmBOH2uNvjZvNtNcg==/com.google.android.webview-qvKmpXppuadiQrPw00UVWQ==/lib/arm64:/data/app/~~9kDi2zmBOH2uNvjZvNtNcg==/com.google.android.webview-qvKmpXppuadiQrPw00UVWQ==/base.apk!/lib/arm64-v8a:/data/app/~~fArrmlbfs7VlP4Bi_xEngw==/com.google.android.trichromelibrary_631211833-MxtJDt-3dlC3tO5AZ9y6aw==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand
D/nativeloader(27676): Extending system_exposed_libraries: libedgetpu_dba.google.so
D/nativeloader(27676): Configuring clns-6 for other apk /data/app/~~9kDi2zmBOH2uNvjZvNtNcg==/com.google.android.webview-qvKmpXppuadiQrPw00UVWQ==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~9kDi2zmBOH2uNvjZvNtNcg==/com.google.android.webview-qvKmpXppuadiQrPw00UVWQ==/lib/arm64:/data/app/~~9kDi2zmBOH2uNvjZvNtNcg==/com.google.android.webview-qvKmpXppuadiQrPw00UVWQ==/base.apk!/lib/arm64-v8a:/data/app/~~fArrmlbfs7VlP4Bi_xEngw==/com.google.android.trichromelibrary_631211833-MxtJDt-3dlC3tO5AZ9y6aw==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand
I/WebViewFactory(27676): Loading com.google.android.webview version 123.0.6312.118 (code 631211833)
D/TrafficStats(27676): tagSocket(281) with statsTag=0x0, statsUid=-1
I/cr_WVCFactoryProvider(27676): Loaded version=123.0.6312.118 minSdkVersion=29 isBundle=true multiprocess=true packageId=2
I/cr_LibraryLoader(27676): Successfully loaded native library
I/cr_CachingUmaRecorder(27676): Flushed 6 samples from 6 histograms, 0 samples were dropped.
I/cr_CombinedPProvider(27676): #registerProvider() provider:WV.f7@17ea457 isPolicyCacheEnabled:false policyProvidersSize:0
I/cr_PolicyProvider(27676): #setManagerAndSource() 0
I/cr_CombinedPProvider(27676): #linkNativeInternal() 1
I/cr_AppResProvider(27676): #getApplicationRestrictionsFromUserManager() Bundle[EMPTY_PARCEL]
I/cr_PolicyProvider(27676): #notifySettingsAvailable() 0
I/cr_CombinedPProvider(27676): #onSettingsAvailable() 0
I/cr_CombinedPProvider(27676): #flushPolicies()
D/CompatibilityChangeReporter(27676): Compat change id reported: 214741472; UID 10463; state: ENABLED
W/DynamiteModule(27676): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
I/DynamiteModule(27676): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller(27676): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
D/nativeloader(27676): Configuring clns-7 for other apk /system/framework/org.apache.http.legacy.jar. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~hYtutiLBzEOD1IYRMrW1ag==/com.google.android.gms-83CmeH1GAR8HhgKAGojucg==/lib/arm64:/data/app/~~hYtutiLBzEOD1IYRMrW1ag==/com.google.android.gms-83CmeH1GAR8HhgKAGojucg==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms
D/nativeloader(27676): Extending system_exposed_libraries: libedgetpu_dba.google.so
D/nativeloader(27676): Configuring clns-8 for other apk /system/framework/com.android.media.remotedisplay.jar. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~hYtutiLBzEOD1IYRMrW1ag==/com.google.android.gms-83CmeH1GAR8HhgKAGojucg==/lib/arm64:/data/app/~~hYtutiLBzEOD1IYRMrW1ag==/com.google.android.gms-83CmeH1GAR8HhgKAGojucg==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms
D/nativeloader(27676): Extending system_exposed_libraries: libedgetpu_dba.google.so
W/test.test(27676): Loading /data/misc/apexdata/com.android.art/dalvik-cache/arm64/system@[email protected]@classes.odex non-executable as it requires an image which we failed to load
D/nativeloader(27676): Configuring clns-9 for other apk /system/framework/com.android.location.provider.jar. target_sdk_version=34, uses_libraries=ALL, library_path=/data/app/~~hYtutiLBzEOD1IYRMrW1ag==/com.google.android.gms-83CmeH1GAR8HhgKAGojucg==/lib/arm64:/data/app/~~hYtutiLBzEOD1IYRMrW1ag==/com.google.android.gms-83CmeH1GAR8HhgKAGojucg==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms
D/nativeloader(27676): Extending system_exposed_libraries: libedgetpu_dba.google.so
D/nativeloader(27676): Configuring clns-10 for other apk /data/app/~~hYtutiLBzEOD1IYRMrW1ag==/com.google.android.gms-83CmeH1GAR8HhgKAGojucg==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~hYtutiLBzEOD1IYRMrW1ag==/com.google.android.gms-83CmeH1GAR8HhgKAGojucg==/lib/arm64:/data/app/~~hYtutiLBzEOD1IYRMrW1ag==/com.google.android.gms-83CmeH1GAR8HhgKAGojucg==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.android.gms
V/NativeCrypto(27676): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 305 native methods...
W/test.test(27676): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (unsupported, reflection, allowed)
I/ProviderInstaller(27676): Installed default security provider GmsCore_OpenSSL
D/VRI[MainActivity](27676): Draw frame after cancel
D/TrafficStats(27676): tagSocket(159) with statsTag=0xffffffff, statsUid=-1
W/test.test(27676): Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (unsupported, reflection, allowed)
W/test.test(27676): Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (unsupported, reflection, allowed)
I/test.test(27676): Background concurrent mark compact GC freed 434896(30MB) AllocSpace objects, 104(4624KB) LOS objects, 71% free, 39MB/135MB, paused 775us,2.447ms total 169.565ms
W/test.test(27676): ApkAssets: Deleting an ApkAssets object '<empty> and /data/app/~~9kDi2zmBOH2uNvjZvNtNcg==/com.google.android.webview-qvKmpXppuadiQrPw00UVWQ==/base.apk' with 1 weak references
W/test.test(27676): ApkAssets: Deleting an ApkAssets object '<empty> and /data/app/~~9kDi2zmBOH2uNvjZvNtNcg==/com.google.android.webview-qvKmpXppuadiQrPw00UVWQ==/split_config.en.apk' with 1 weak references
W/test.test(27676): ApkAssets: Deleting an ApkAssets object '<empty> and /data/app/~~9kDi2zmBOH2uNvjZvNtNcg==/com.google.android.webview-qvKmpXppuadiQrPw00UVWQ==/split_config.fr.apk' with 1 weak references
W/test.test(27676): ApkAssets: Deleting an ApkAssets object '<empty> and /data/app/~~fArrmlbfs7VlP4Bi_xEngw==/com.google.android.trichromelibrary_631211833-MxtJDt-3dlC3tO5AZ9y6aw==/base.apk' with 1 weak references
D/CompatibilityChangeReporter(27676): Compat change id reported: 160794467; UID 10463; state: ENABLED
D/ProfileInstaller(27676): Installing profile for com.nutest.test
D/BufferPoolAccessor2.0(27676): bufferpool2 0xb4000070a3755808 : 5(36700160 size) total buffers - 4(29360128 size) used buffers - 15/20 (recycle/alloc) - 7/20 (fetch/transfer)
D/BufferPoolAccessor2.0(27676): evictor expired: 1, evicted: 1
D/BufferPoolAccessor2.0(27676): bufferpool2 0xb4000070a37227b8 : 5(40960 size) total buffers - 0(0 size) used buffers - 23/28 (recycle/alloc) - 13/28 (fetch/transfer)
D/BufferPoolAccessor2.0(27676): evictor expired: 1, evicted: 1
I/TRuntime.CctTransportBackend(27676): Making request to: https://firebaselogging-pa.googleapis.com/v1/firelog/legacy/batchlog
D/TrafficStats(27676): tagSocket(160) with statsTag=0xffffffff, statsUid=-1
I/TRuntime.CctTransportBackend(27676): Status Code: 200
flutter debugging logging terminal command-line
1个回答
0
投票

如果您使用 VS Code,最好使用启动配置来启动应用程序,以便输出将被重定向到允许过滤的

Console
选项卡。

否则,如果您从终端运行它,您仍然可以对输出应用一些过滤,但如果您使用 VS Code、Android Studio 的终端或直接从操作系统使用终端,这并不重要(例如。

Terminal
对于 MacOS 或
CMD
对于 Windows)。

过滤命令将取决于您的操作系统。

假设您只想显示使用 Dart 的

print(...)
记录的行。这些通常有前缀
flutter:

MacOS/Linux 命令:

flutter run | grep 'flutter:'

Windows 命令:

flutter run | findstr 'flutter:'

这个方法可能是一个很好的起点。缺点是它会过滤掉不包含字符串的行,即使它们实际上来自 Flutter 日志,例如,如果单个

print()
调用输出多行。

我能想到的另一种方法是将输出重定向到一个文件,您可以使用另一个应用程序(如日志查看器)打开该文件:

flutter run > app.log
© www.soinside.com 2019 - 2024. All rights reserved.