public interface ITestLogger
Known Indirect Subclasses
AggregatingProfilerListener An ITestInvocationListener which communicates test progress to instances of ITestProfiler
BaseDeviceMetricCollector Base implementation of IMetricCollector that allows to start and stop collection on onTestRunStart(DeviceMetricData) and onTestRunEnd(DeviceMetricData, Map)
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. 
CodeCoverageListener A ResultForwarder that will pull coverage measurements off of the device and log them as test artifacts. 
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. 
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. 
FilePullerDeviceMetricCollector A BaseDeviceMetricCollector that listen for metrics key coming from the device and pull them as a file from the device. 
ICommandScheduler.IScheduledInvocationListener Listener for invocation events when invocation completes. 
ILogSaverListener Allows for ITestInvocationListeners to listen for when log files are saved. 
IMetricCollector This interface will be added as a decorator when reporting tests results in order to collect matching metrics. 
IShardableListener A ITestInvocationListener that can be sharded. 
ITestInvocationListener Listener for test results from the test invocation. 
InstrumentationTest.FailedTestLogcatGenerator A ResultForwarder that will forward a logcat snapshot on each failed test. 
InstrumentationTest.FailedTestScreenshotGenerator A ResultForwarder that will forward a screenshot on test failures. 
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. 
PythonBinaryHostTest.PythonForwarder Result forwarder to replace the run name by the binary name. 
ResultForwarder A ITestInvocationListener that forwards invocation results to a list of other listeners. 
ScheduledDeviceMetricCollector A IMetricCollector that allows to run a collection task periodically at a set interval. 
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. 
TradefedSandboxRunner.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.


Public methods

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

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

Public methods


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.

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.