Stay organized with collections
Save and categorize content based on your preferences.
LogcatReceiver
public
class
LogcatReceiver
extends Object
implements
ILogcatReceiver
java.lang.Object
|
↳ |
com.android.tradefed.device.LogcatReceiver
|
Class that collects logcat in background. Continues to capture logcat even if device goes
offline then online.
Summary
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 constructors
LogcatReceiver
public LogcatReceiver (ITestDevice device,
String logcatCmd,
long maxFileSize,
int logStartDelay)
Creates an instance with any specified logcat command
Parameters |
device |
ITestDevice : the device to start logcat on |
logcatCmd |
String : the logcat command to run (including 'logcat' part), see details on
available options in logcat help message |
maxFileSize |
long : maximum file size, earlier lines will be discarded once size is reached |
logStartDelay |
int : the delay to wait after the device becomes online |
LogcatReceiver
public LogcatReceiver (ITestDevice device,
long maxFileSize,
int logStartDelay)
Creates an instance with default logcat 'threadtime' format
Parameters |
device |
ITestDevice : the device to start logcat on |
maxFileSize |
long : maximum file size, earlier lines will be discarded once size is reached |
logStartDelay |
int : the delay to wait after the device becomes online |
Public methods
clear
public void clear ()
getDefaultLogcatCmd
public static String getDefaultLogcatCmd (ITestDevice device)
Get the default logcat command, only append uid format if api level > 24.
Parameters |
device |
ITestDevice |
getLogcatData
public InputStreamSource getLogcatData (int maxBytes,
int offset)
Returns the current logcat buffer given an offset.
Parameters |
maxBytes |
int : The max size of the returned buffer |
offset |
int : The offset of the full buffer. |
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 2023-03-08 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2023-03-08 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-08 UTC."]]