to top
public class

LogcatReceiver

extends Object
java.lang.Object
   ↳ com.android.tradefed.device.LogcatReceiver

Class Overview

Class that collects logcat in background. Continues to capture logcat even if device goes offline then online.

Summary

Constants
String LOGCAT_CMD
Public Constructors
LogcatReceiver(ITestDevice device, String logcatCmd, long maxFileSize, int logStartDelay)
Creates an instance with any specified logcat command
LogcatReceiver(ITestDevice device, long maxFileSize, int logStartDelay)
Creates an instance with default logcat 'threadtime' format
Public Methods
void clear()
InputStreamSource getLogcatData(int maxBytes)
InputStreamSource getLogcatData()
void start()
void stop()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

static final String LOGCAT_CMD

Constant Value: "logcat -v threadtime"

Public Constructors

public LogcatReceiver (ITestDevice device, String logcatCmd, long maxFileSize, int logStartDelay)

Creates an instance with any specified logcat command

Parameters
device the device to start logcat on
logcatCmd the logcat command to run (including 'logcat' part), see details on available options in logcat help message
maxFileSize maximum file size, earlier lines will be discarded once size is reached
logStartDelay the delay to wait after the device becomes online

public LogcatReceiver (ITestDevice device, long maxFileSize, int logStartDelay)

Creates an instance with default logcat 'threadtime' format

Parameters
device the device to start logcat on
maxFileSize maximum file size, earlier lines will be discarded once size is reached
logStartDelay the delay to wait after the device becomes online

Public Methods

public void clear ()

public InputStreamSource getLogcatData (int maxBytes)

public InputStreamSource getLogcatData ()

public void start ()

public void stop ()