android 开发,USB 一连上手机,logcat 输出就停不下来,怎么回事

2014-10-06 23:55:18 +08:00
 Registering
开发android用真机进行测试时,USB一连上手机,logcat输出停不下来。
貌似我在手机上做做得任何操作都输出到logcat上了,好像在调试整个android系统了,根本停不下来,怎么破

如下,,,,是其中一段

10-06 23:13:56.055: D/BluetoothAdapter(2674): 1109355176: getState() : mService = null. Returning STATE_OFF
10-06 23:13:56.055: D/DisplayPowerController(2594): setBrightness mPendingRequestLocked.buttonBrightness = 61
10-06 23:13:56.075: D/RampAnimator(2594): animateTo reallyTarget is 1012rate is 25mode is 0
10-06 23:13:56.080: D/DisplayPowerController(2594): setBrightness mPendingRequestLocked.buttonBrightness = 61
10-06 23:13:56.080: D/PowerManagerService(2594): set home button brightness by screen_brightness = 112
10-06 23:13:56.270: V/AudioPolicyManager(2142): getDeviceForStrategy() from cache strategy 1, device 1
10-06 23:13:56.270: D/chenfang_volume(2594): getStreamVolume = 150
10-06 23:13:56.275: D/PowerManagerService(2594): set home button brightness by screen_brightness = 111
10-06 23:13:56.275: D/DisplayPowerController(2594): requestPowerState: screenState=2, useProximitySensor=false, screenBrightness=102, screenAutoBrightnessAdjustment=0.0, useAutoBrightness=true, blockScreenOn=false, buttonBrightness=60, adjustByUserInAutoBrightness=false, isTurnOnAction=true, waitForNegativeProximity=false
10-06 23:13:56.280: D/RampAnimator(2594): animateTo reallyTarget is 1012rate is 25mode is 0
10-06 23:13:56.280: D/DisplayPowerController(2594): setBrightness mPendingRequestLocked.buttonBrightness = 60
10-06 23:13:56.285: D/BluetoothAdapter(2674): 1109355176: getState() : mService = null. Returning STATE_OFF
10-06 23:13:56.290: D/RampAnimator(2594): animateTo reallyTarget is 1012rate is 25mode is 0
10-06 23:13:56.290: D/DisplayPowerController(2594): setBrightness mPendingRequestLocked.buttonBrightness = 60
10-06 23:13:56.290: D/PowerManagerService(2594): set home button brightness by screen_brightness = 111
10-06 23:13:56.500: V/AudioPolicyManager(2142): getDeviceForStrategy() from cache strategy 1, device 1
5544 次点击
所在节点    问与答
8 条回复
endoffight
2014-10-07 00:08:53 +08:00
这个应该是没有filter过滤的情况把,仔细找找,会有一个过滤选项的。
icedx
2014-10-07 00:27:49 +08:00
Logcat本来就是这样的...
cnbuff410
2014-10-07 03:29:47 +08:00
adb logcat TAG:D *:S

会只显示debug level以”TAG“为tag的信息。

依此类推
slickqt
2014-10-07 09:15:06 +08:00
adb logcat | grep xxx
SR1
2014-10-07 11:12:40 +08:00
logcat 本来就是这样,系统本身也会打出很多log
调试APP的时候一般IDE会给你加个Filter的
你也可以自己加Filter过滤,支持过滤 TAG、TEXT等等。。
我的习惯是,在自己的打出来的log上加上“-->”
然后用text:-->过滤一下
不过这也有个弊端,就是会把错误信息忽略...
jimbray
2014-10-07 11:33:35 +08:00
开发版的 ROM ? 系统应用都是没有关掉日志的,当然停不下来啦
veiz
2014-10-07 15:49:08 +08:00
filter + regex
Registering
2014-10-23 12:29:02 +08:00
已搞定

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/137348

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX