The new version of studio cannot filter the Log

Table of contents

Method 1 is simple and rude, for nostalgics, you can switch back to the original log view

 Method 2: Learn a new log filtering method


After upgrading the new version of AndroidStudio, the log log looks like the following. I found that the previously filtered error and infor tabs are gone, and I am not calm for a moment. After consulting the information, I found that it has actually become more powerful. There are two solutions:

Method 1 is simple and rude, for nostalgics, you can switch back to the original log view

In Settings->Experimental->Logcat->Enable new Logcat tool window, check and remove it

 Method 2: Learn a new log filtering method

1. In the red box in the figure below, the following filters are supported, where level is the previous Error, infor and other filters

  • tag: Matches fields of log entries  tag .
  • package: Matches the package name of the logging application.
  • process: Matches the process name of the logging app.
  • message: Matches the message portion of a log entry.
  • level: Match logs with the specified severity level or higher, eg  DEBUG.
  • age: Matches if the entry timestamp is the most recent. The value is specified as a number followed by a letter representing the unit of time: s for seconds, m for minutes, h for hours, d for days. For example, age: 5m only messages logged in the past 5 minutes are filtered.
  • is : is:crash  Matches log entries that indicate an application crash (native or Java). is:stacktrace Matches any log entry that represents a Java stack trace, regardless of log level.

       Note that the different symbols after the filter type represent different filter matches

        

2. In addition to separate filtering, logical operators are also supported

For example:

(tag:foo | tag:bar) & package:myapp

Guess you like

Origin blog.csdn.net/s_nshine/article/details/131687883