ITestLogger

public interface ITestLogger

com.android.tradefed.log.ITestLogger
Known Indirect Subclasses
AggregatingProfilerListener An ITestInvocationListener which communicates test progress to instances of ITestProfiler
BugreportCollector A pass-through ITestInvocationListener that collects bugreports when configurable events occur and then calls testLog(String, LogDataType, InputStreamSource) on its children after each bugreport is collected. 
CodeCoverageReporter A ITestInvocationListener that will generate code coverage reports. 
CodeCoverageTestBase.CoverageCollectingListener A ResultForwarder which collects coverage files. 
CollectingTestListener A ITestInvocationListener that will collect all test results. 
ConsoleResultReporter Result reporter to print the test results to the console. 
DeviceUnavailEmailResultReporter An EmailResultReporter that will send email when invocation fails due to a device not available exception. 
EmailResultReporter A simple result reporter base class that sends emails for test results. 
ExecCommandTracker  
FailureEmailResultReporter An EmailResultReporter that sends notifications if either a test failure or invocation failure occurred. 
FileMetadataCollector A listener that collects and uploads metadata about saved log files. 
ICommandScheduler.IScheduledInvocationListener Listener for invocation events when invocation completes. 
ILogSaverListener Allows for ITestInvocationListeners to listen for when log files are saved. 
IShardableListener A ITestInvocationListener that can be sharded. 
ITestInvocationListener Listener for test results from the test invocation. 
ITestSummaryListener  
InvocationFailureEmailResultReporter An EmailResultReporter that can also restrict notifications to just invocation failures. 
InvocationToJUnitResultForwarder A class that listens to ITestInvocationListener events and forwards them to a TestListener
JsonHttpTestResultReporter A result reporter that encode test metrics results and branch, device info into JSON and POST into an HTTP service endpoint  
LogSaverResultForwarder A ResultForwarder for saving logs with the global file saver. 
ModuleListener Listener attached to each IRemoteTest of each module in order to collect the list of results. 
NameMangleListener A proxy listener to translate test method, class, and package names as results are reported. 
ResultForwarder A ITestInvocationListener that forwards invocation results to a list of other listeners. 
ShardListener A ITestInvocationListener that collects results from a invocation shard (aka an invocation split to run on multiple resources in parallel), and forwards them to another listener. 
ShardMasterResultForwarder A ResultForwarder that combines the results of a sharded test invocations. 
StubTestInvocationListener This class is deprecated. Classes should implement ITestInvocationListener directly.  
SubprocessResultsReporter Implements ITestInvocationListener to be specified as a result_reporter and forward from the subprocess the results of tests, test runs, test invocations. 
SuiteResultReporter Collect test results for an entire suite invocation and output the final results. 
TestFailureEmailResultReporter An EmailResultReporter that can also restrict notifications to just test failures. 
TestFailureListener Listener used to take action such as screenshot, bugreport, logcat collection upon a test failure when requested. 
TextResultReporter A test result reporter that forwards results to the JUnit text result printer. 
TradefedSanboxRunner.StubScheduledInvocationListener A stub ICommandScheduler.IScheduledInvocationListener that does nothing. 
XmlResultReporter Writes JUnit results to an XML files in a format consistent with Ant's XMLJUnitResultFormatter. 


An entity that can perform logging of data streams of various types.

Summary

Public methods

default void testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)

Provides the associated log or debug data from the test invocation.

Public methods

testLog

void testLog (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

Provides the associated log or debug data from the test invocation.

Must be called before invocationFailed(Throwable) or invocationEnded(long)

The TradeFederation framework will automatically call this method, providing the host log and if applicable, the device logcat.

Parameters
dataName String: a String descriptive name of the data. e.g. "device_logcat". Note dataName may not be unique per invocation. ie implementers must be able to handle multiple calls with same dataName

dataType LogDataType: the LogDataType of the data

dataStream InputStreamSource: the InputStreamSource of the data. Implementers should call createInputStream to start reading the data, and ensure to close the resulting InputStream when complete. Callers should ensure the source of the data remains present and accessible until the testLog method completes.