StdoutLogger

public class StdoutLogger
extends Object implements ILeveledLogOutput

java.lang.Object
   ↳ com.android.tradefed.log.StdoutLogger


A ILeveledLogOutput that directs log messages to stdout.

Summary

Public constructors

StdoutLogger()

Public methods

ILeveledLogOutput clone()
void closeLog()

Closes the log and performs any cleanup before closing, as necessary.

InputStreamSource getLog()

Grabs a snapshot stream of the log data.

Log.LogLevel getLogLevel()

Gets the minimum log level to display.

void init()

Initialize the log, creating any required IO resources.

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

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

void setLogLevel(Log.LogLevel logLevel)

Sets the minimum log level to display.

Public constructors

StdoutLogger

StdoutLogger ()

Public methods

clone

ILeveledLogOutput clone ()

Returns
ILeveledLogOutput

closeLog

void closeLog ()

Closes the log and performs any cleanup before closing, as necessary.

getLog

InputStreamSource getLog ()

Grabs a snapshot stream of the log data.

Must not be called after closeLog().

The returned stream is not guaranteed to have optimal performance. Callers may wish to wrap result in a BufferedInputStream.

Returns
InputStreamSource a InputStreamSource of the log data

getLogLevel

Log.LogLevel getLogLevel ()

Gets the minimum log level to display.

Returns
Log.LogLevel the current Log.LogLevel

init

void init ()

Initialize the log, creating any required IO resources.

Throws
IOException

printAndPromptLog

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

Parameters
logLevel Log.LogLevel
tag String
message String

printLog

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

Parameters
logLevel Log.LogLevel
tag String
message String

setLogLevel

void setLogLevel (Log.LogLevel logLevel)

Sets the minimum log level to display.

Parameters
logLevel Log.LogLevel: the Log.LogLevel to display