Google is committed to advancing racial equity for Black communities. See how.

BaseStreamLogger

public abstract class BaseStreamLogger
extends BaseLeveledLogOutput

java.lang.Object
   ↳ com.android.tradefed.log.BaseLeveledLogOutput
     ↳ com.android.tradefed.log.BaseStreamLogger<OS extends OutputStream>


A ILeveledLogOutput that directs log messages to an output stream and to stdout.

Summary

Fields

protected OS extends OutputStream mOutputStream

Public constructors

BaseStreamLogger()

Public methods

void closeLog()
Log.LogLevel getLogLevel()
void printAndPromptLog(Log.LogLevel logLevel, String tag, String message)
void printLog(Log.LogLevel logLevel, String tag, String message)
void setLogLevel(Log.LogLevel logLevel)
void setLogLevelDisplay(Log.LogLevel logLevel)

Sets the minimum LogLevel to display on stdout.

Protected methods

void writeToLog(String message)

Writes a message to the output stream.

Fields

mOutputStream

protected OS extends OutputStream mOutputStream

Public constructors

BaseStreamLogger

public BaseStreamLogger ()

Public methods

closeLog

public void closeLog ()

getLogLevel

public Log.LogLevel getLogLevel ()

Returns
Log.LogLevel

printAndPromptLog

public void printAndPromptLog (Log.LogLevel logLevel, 
                String tag, 
                String message)

Parameters
logLevel Log.LogLevel

tag String

message String

printLog

public void printLog (Log.LogLevel logLevel, 
                String tag, 
                String message)

Parameters
logLevel Log.LogLevel

tag String

message String

setLogLevel

public void setLogLevel (Log.LogLevel logLevel)

Parameters
logLevel Log.LogLevel

setLogLevelDisplay

public void setLogLevelDisplay (Log.LogLevel logLevel)

Sets the minimum LogLevel to display on stdout.

Parameters
logLevel Log.LogLevel

Protected methods

writeToLog

protected void writeToLog (String message)

Writes a message to the output stream.

Parameters
message String: the entry to write to log

Throws
if an I/O error occurs