V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
Registering
V2EX  ›  问与答

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

  •  
  •   Registering · 2014-10-06 23:55:18 +08:00 · 5523 次点击
    这是一个创建于 3702 天前的主题,其中的信息可能已经有所发展或是发生改变。
    开发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
    8 条回复    2014-10-23 12:29:02 +08:00
    endoffight
        1
    endoffight  
       2014-10-07 00:08:53 +08:00
    这个应该是没有filter过滤的情况把,仔细找找,会有一个过滤选项的。
    icedx
        2
    icedx  
       2014-10-07 00:27:49 +08:00
    Logcat本来就是这样的...
    cnbuff410
        3
    cnbuff410  
       2014-10-07 03:29:47 +08:00
    adb logcat TAG:D *:S

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

    依此类推
    slickqt
        4
    slickqt  
       2014-10-07 09:15:06 +08:00
    adb logcat | grep xxx
    SR1
        5
    SR1  
       2014-10-07 11:12:40 +08:00
    logcat 本来就是这样,系统本身也会打出很多log
    调试APP的时候一般IDE会给你加个Filter的
    你也可以自己加Filter过滤,支持过滤 TAG、TEXT等等。。
    我的习惯是,在自己的打出来的log上加上“-->”
    然后用text:-->过滤一下
    不过这也有个弊端,就是会把错误信息忽略...
    jimbray
        6
    jimbray  
       2014-10-07 11:33:35 +08:00
    开发版的 ROM ? 系统应用都是没有关掉日志的,当然停不下来啦
    veiz
        7
    veiz  
       2014-10-07 15:49:08 +08:00 via iPhone
    filter + regex
    Registering
        8
    Registering  
    OP
       2014-10-23 12:29:02 +08:00
    已搞定
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5751 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 01:49 · PVG 09:49 · LAX 17:49 · JFK 20:49
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.