提问人:Saud Aljaffer 提问时间:10/14/2023 更新时间:10/14/2023 访问量:56
WSA logcat 日志记录正在填充我的磁盘
WSA logcat logging is filling out my disk
问:
我过去开发过一些 android 应用程序,可能启用了调试模式,然后禁用了它。不久前,我还试图诊断WSA中的冻结问题,并且可能通过adb启用了更多日志记录,但我不记得我以前做过什么。
我现在遇到的问题是,当我使用 WSA 进行正常活动(而不是开发)时,WSA logcat 会不合理地创建数百 GB 的日志。请告诉我如何禁用这个极其冗长的日志记录,因为我有点迷茫。
位于C:\Users\username\AppData\Local\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalState\diagnostics\logcat
我注意到大多数重复的日志类似于下面的示例:
nBroadcast:3051 com.android.server.ConnectivityService.updateInetCondition:9196
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.174 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.175 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
10-05 07:48:50.175 256 257 E virtualinputservice: Failed to write input event: Bad file descriptor.
我已经在 Android 设置中禁用了详细日志记录。我还进入了 adb shell 并检查了缓冲区,发现缓冲区默认大小为 256kb。值得注意的是,没有清除logcat文件夹中的日志,它似乎是从另一个来源生成的日志。adb logcat -g
adb logcat -c
我只想禁用日志记录,或者至少让它以 256mb 的最大日志大小旋转。也许一个解决方案是阻止该日志消息不断被垃圾邮件的原因。
答: 暂无答案
评论