LogcatReceiver

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' 形式でインスタンスを作成します

公開メソッド

void clear ()
static String getDefaultLogcatCmd ( ITestDevice device)

デフォルトの logcat コマンドを取得し、API レベル > 24 の場合にのみ uid 形式を追加します。

InputStreamSource getLogcatData (int maxBytes, int offset)

オフセットを指定して現在の logcat バッファを返します。

InputStreamSource getLogcatData (int maxBytes)
InputStreamSource getLogcatData ()
void start ()
void stop ()

パブリック コンストラクター

LogcatReceiver

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

指定された任意の logcat コマンドでインスタンスを作成します

パラメーター
device ITestDevice : logcat を開始するデバイス

logcatCmd String : 実行する logcat コマンド (「logcat」部分を含む)、logcat ヘルプ メッセージで使用可能なオプションの詳細を参照してください

maxFileSize long : 最大ファイル サイズ。サイズに達すると、前の行は破棄されます。

logStartDelay int : デバイスがオンラインになった後に待機する遅延

LogcatReceiver

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

デフォルトの logcat 'threadtime' 形式でインスタンスを作成します

パラメーター
device ITestDevice : logcat を開始するデバイス

maxFileSize long : 最大ファイル サイズ。サイズに達すると、前の行は破棄されます。

logStartDelay int : デバイスがオンラインになった後に待機する遅延

公開メソッド

クリア

public void clear ()

getDefaultLogcatCmd

public static String getDefaultLogcatCmd (ITestDevice device)

デフォルトの logcat コマンドを取得し、API レベル > 24 の場合にのみ uid 形式を追加します。

パラメーター
device ITestDevice

戻り値
String

getLogcatData

public InputStreamSource getLogcatData (int maxBytes, 
                int offset)

オフセットを指定して現在の logcat バッファを返します。

パラメーター
maxBytes int : 返されるバッファの最大サイズ

offset int : フル バッファのオフセット。

戻り値
InputStreamSourceオフセットから始まる logcat バッファー。

getLogcatData

public InputStreamSource getLogcatData (int maxBytes)

パラメーター
maxBytes int

戻り値
InputStreamSource

getLogcatData

public InputStreamSource getLogcatData ()

戻り値
InputStreamSource

始める

public void start ()

ストップ

public void stop ()