Logcat接收器
public class LogcatReceiver
extends Object
implements ILogcatReceiver
java.lang.Object |
↳ | com.android.tradefed.device.LogcatReceiver |
在后台收集logcat的类。即使设备脱机然后联机,仍继续捕获logcat。
概括
公共建设者 |
---|
LogcatReceiver (ITestDevice device, String logcatCmd, long maxFileSize, int logStartDelay) 使用任何指定的logcat命令创建实例 |
LogcatReceiver (ITestDevice device, long maxFileSize, int logStartDelay) 创建具有默认logcat'threadtime'格式的实例 |
公共建设者
Logcat接收器
public LogcatReceiver (ITestDevice device,
String logcatCmd,
long maxFileSize,
int logStartDelay)
使用任何指定的logcat命令创建实例
参数 |
---|
device | ITestDevice :启动logcat的设备 |
logcatCmd | String :要运行的logcat命令(包括“ logcat”部分),请参阅logcat帮助消息中有关可用选项的详细信息 |
maxFileSize | long :最大文件大小,达到大小后,较早的行将被丢弃 |
logStartDelay | int :设备联机后等待的延迟 |
Logcat接收器
public LogcatReceiver (ITestDevice device,
long maxFileSize,
int logStartDelay)
创建具有默认logcat'threadtime'格式的实例
参数 |
---|
device | ITestDevice :启动logcat的设备 |
maxFileSize | long :最大文件大小,达到大小后,较早的行将被丢弃 |
logStartDelay | int :设备联机后等待的延迟 |
公开方法
getLogcatData
public InputStreamSource getLogcatData (int maxBytes,
int offset)
返回给定偏移量的当前logcat缓冲区。
参数 |
---|
maxBytes | int :返回的缓冲区的最大大小 |
offset | int :完整缓冲区的偏移量。 |
退货 |
---|
InputStreamSource | logcat缓冲区从偏移量开始。 |
getLogcatData
public InputStreamSource getLogcatData (int maxBytes)
getLogcatData
public InputStreamSource getLogcatData ()