public final class LogCatFilter
extends java.lang.Object
| Constructor and Description |
|---|
LogCatFilter(java.lang.String name,
java.lang.String tag,
java.lang.String text,
java.lang.String pid,
java.lang.String appName,
Log.LogLevel logLevel)
Construct a filter with the provided restrictions for the logcat message.
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<LogCatFilter> |
fromString(java.lang.String query,
Log.LogLevel minLevel)
Construct a list of
LogCatFilter objects by decoding the query. |
java.lang.String |
getAppName() |
Log.LogLevel |
getLogLevel() |
java.lang.String |
getName() |
java.lang.String |
getPid() |
java.lang.String |
getTag() |
java.lang.String |
getText() |
boolean |
matches(LogCatMessage m)
Check whether a given message will make it through this filter.
|
public LogCatFilter(@NonNull
java.lang.String name,
@NonNull
java.lang.String tag,
@NonNull
java.lang.String text,
@NonNull
java.lang.String pid,
@NonNull
java.lang.String appName,
@NonNull
Log.LogLevel logLevel)
name - name for the filtertag - value for the logcat message's tag field.text - value for the logcat message's text field.pid - value for the logcat message's pid field.appName - value for the logcat message's app name field.logLevel - value for the logcat message's log level. Only messages of
higher priority will be accepted by the filter.public static java.util.List<LogCatFilter> fromString(java.lang.String query, Log.LogLevel minLevel)
LogCatFilter objects by decoding the query.query - encoded search string. The query is simply a list of words (can be regexes)
a user would type in a search bar. These words are searched for in the text field of
each collected logcat message. To search in a different field, the word could be prefixed
with a keyword corresponding to the field name. Currently, the following keywords are
supported: "pid:", "tag:" and "text:". Invalid regexes are ignored.minLevel - minimum log level to match@NonNull public java.lang.String getName()
@NonNull public java.lang.String getTag()
@NonNull public java.lang.String getText()
@NonNull public java.lang.String getPid()
@NonNull public java.lang.String getAppName()
@NonNull public Log.LogLevel getLogLevel()
public boolean matches(LogCatMessage m)
m - message to check