【问题标题】:What best way to CONSTANTLY disable specific lines in logcat in Eclipse?在 Eclipse 中不断禁用 logcat 中特定行的最佳方法是什么?
【发布时间】:2014-09-23 06:22:57
【问题描述】:

我使用 Eclipse 并观看 logcat 控制台。

我会定期看到来自另一个应用程序的后续行(这是示例):

09-23 10:13:12.437: I/wpa_supplicant(17725): wlan0: Control interface command 'SIGNAL_POLL'

或

09-23 10:13:17.223: E/Parcel(350): Reading a NULL string not supported here.

或

09-23 10:13:31.858: I/BatteryService(916): start UEvent update, event = {SUBSYSTEM=power_supply, DEVPATH=/devices/platform/msm_ssbi.0/pm8038-core/pm8921-charger/power_supply/battery, POWER_SUPPLY_HEALTH=Good, POWER_SUPPLY_STATUS=Charging, POWER_SUPPLY_TECHNOLOGY=Li-ion, POWER_SUPPLY_ENERGY_FULL=1739000, POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3200000, POWER_SUPPLY_TEMP=327, POWER_SUPPLY_PRESENT=1, POWER_SUPPLY_NAME=battery, POWER_SUPPLY_CHARGE_NOW=949126, POWER_SUPPLY_CURRENT_MAX=2217772, POWER_SUPPLY_CAPACITY=44, POWER_SUPPLY_VOLTAGE_MAX_DESIGN=4200000, SEQNUM=147831, POWER_SUPPLY_CURRENT_NOW=-320900, POWER_SUPPLY_VOLTAGE_NOW=3873819, ACTION=change, POWER_SUPPLY_CHARGE_TYPE=Fast}

等等

我可以通过控制台中的过滤器禁用显示此行。但是每次重启 Eclipse 或重新打开 logcat 控制台时,我必须执行此操作。

在 Eclipse 的 logcat 中持续禁用显示该行的最佳方法是什么?

【问题讨论】:

    标签: android eclipse logcat


    【解决方案1】:

    转到您的 logcat,并添加所需的过滤器以显示您只关心的那些日志,

    阅读此here

    或者在你的logact中,按绿色+号,设置所需的值

    【讨论】:

      【解决方案2】:

      是的,有。您可以借助您指定的 TAG 过滤所有 logcat 消息。

      • 为您的 logcat 结果使用特定标签。
      • 在 logcat 中创建一个过滤器,它只过滤特定的标签。

        • 要添加过滤器,请打开 Logcat 并按绿色的 + 按钮。

        • 这将显示一个像这样的对话框

      您还可以为特定的包名称创建过滤器。

      【讨论】:

        【解决方案3】:

        在标签过滤器中添加这一行,

        添加/删除标签名称,例如“** wpa_supplicant**”,这将禁用 ** wpa_supplicant** 的日志

        tag:^(?!Choreographer|BatteryService|Parcel|wpa_supplicant).*$

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2011-02-15
          • 1970-01-01
          • 2011-08-07
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多