ITestLogger

public interface ITestLogger

com.android.tradefed.log.ITestLogger


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

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

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

Must be called before ERROR(/ITestInvocationListener#invocationFailed(Throwable)) or ERROR(/ITestInvocationListener#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.