Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
LogReceiver
public
class
LogReceiver
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.log.LogReceiver
|
Summary
Public constructors
LogReceiver
public LogReceiver (ITestDevice device,
String cmd,
String desc)
Parameters |
device |
ITestDevice |
cmd |
String |
desc |
String |
LogReceiver
public LogReceiver (ITestDevice device,
String cmd,
String desc,
long logcat_size,
int delay_secs)
Parameters |
device |
ITestDevice |
cmd |
String |
desc |
String |
logcat_size |
long |
delay_secs |
int |
Public methods
clear
public void clear ()
getDescriptor
public String getDescriptor ()
start
public void start ()
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2022-08-03 UTC.
[null,null,["Last updated 2022-08-03 UTC."],[],[],null,["# LogReceiver\n===========\n\n\n`\npublic\n\n\nclass\nLogReceiver\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.log.LogReceiver |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nSummary\n-------\n\n| ### Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[LogReceiver](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#LogReceiver(com.android.tradefed.device.ITestDevice,%20java.lang.String,%20java.lang.String))`(`[ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` device, String cmd, String desc) ` |\n| ` `[LogReceiver](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#LogReceiver(com.android.tradefed.device.ITestDevice,%20java.lang.String,%20java.lang.String,%20long,%20int))`(`[ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` device, String cmd, String desc, long logcat_size, int delay_secs) ` |\n\n| ### Public methods ||\n|-----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` void` | ` `[clear](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#clear())`() ` |\n| ` `[InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | ` `[getData](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#getData())`() ` |\n| ` String` | ` `[getDescriptor](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#getDescriptor())`() ` |\n| ` `[InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | ` `[getLogcatData](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#getLogcatData(int))`(int maxBytes) ` |\n| ` void` | ` `[postLog](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#postLog(com.android.tradefed.result.ITestInvocationListener))`(`[ITestInvocationListener](../../../../../../reference/tradefed/com/android/tradefed/result/ITestInvocationListener.html)` listener) ` |\n| ` void` | ` `[start](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#start())`() ` |\n| ` void` | ` `[stop](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#stop())`() ` |\n\nPublic constructors\n-------------------\n\n### LogReceiver\n\n```\npublic LogReceiver (ITestDevice device, \n String cmd, \n String desc)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|----------------------|\n| `device` | `ITestDevice` \u003cbr /\u003e |\n| `cmd` | `String` \u003cbr /\u003e |\n| `desc` | `String` \u003cbr /\u003e |\n\n### LogReceiver\n\n```\npublic LogReceiver (ITestDevice device, \n String cmd, \n String desc, \n long logcat_size, \n int delay_secs)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------|----------------------|\n| `device` | `ITestDevice` \u003cbr /\u003e |\n| `cmd` | `String` \u003cbr /\u003e |\n| `desc` | `String` \u003cbr /\u003e |\n| `logcat_size` | `long` \u003cbr /\u003e |\n| `delay_secs` | `int` \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### clear\n\n```\npublic void clear ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### getData\n\n```\npublic InputStreamSource getData ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------|\n| [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | \u003cbr /\u003e |\n\n### getDescriptor\n\n```\npublic String getDescriptor ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------|--------|\n| `String` | \u003cbr /\u003e |\n\n### getLogcatData\n\n```\npublic InputStreamSource getLogcatData (int maxBytes)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|--------------|\n| `maxBytes` | `int` \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------|\n| [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | \u003cbr /\u003e |\n\n### postLog\n\n```\npublic void postLog (ITestInvocationListener listener)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|----------------------------------|\n| `listener` | `ITestInvocationListener` \u003cbr /\u003e |\n\n### start\n\n```\npublic void start ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### stop\n\n```\npublic void stop ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e"]]