از 27 مارس 2025، توصیه می کنیم از android-latest-release
به جای aosp-main
برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
LogReceiver
public class LogReceiver
extends Object
java.lang.object |
↳ | com.android.tradefed.log.LogReceiver |
خلاصه
سازندگان عمومی
LogReceiver
public LogReceiver (ITestDevice device,
String cmd,
String desc)
پارامترها |
---|
device | ITestDevice |
cmd | String |
desc | String |
LogReceiver
public LogReceiver (ITestDevice device,
String cmd,
String desc,
long logcat_size,
int delay_secs)
پارامترها |
---|
device | ITestDevice |
cmd | String |
desc | String |
logcat_size | long |
delay_secs | int |
روش های عمومی
روشن
public void clear ()
getDescriptor
public String getDescriptor ()
شروع کنید
public void start ()
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی."],[],[],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"]]