BaseStreamLogger

public abstract class BaseStreamLogger
extends BaseLeveledLogOutput

java.lang.Object
com.android.tradefed.log.BaseLeveledLogOutput
com.android.tradefed.log.BaseStreamLogger<操作系統擴展 OutputStream>


將日誌消息定向到輸出流和標準輸出的ILeveledLogOutput

概括

領域

protected OS extends OutputStream mOutputStream

公共構造函數

BaseStreamLogger ()

公共方法

void closeLog ()
Log.LogLevel getLogLevel ()
Log.LogLevel getLogLevelDisplay ()
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)

設置在 stdout 上顯示的最小LogLevel

受保護的方法

void writeToLog (String message)

將消息寫入輸出流。

領域

輸出流

protected OS extends OutputStream mOutputStream

公共構造函數

BaseStreamLogger

public BaseStreamLogger ()

公共方法

關閉日誌

public void closeLog ()

獲取日誌級別

public Log.LogLevel getLogLevel ()

退貨
Log.LogLevel

獲取日誌級別顯示

public Log.LogLevel getLogLevelDisplay ()

退貨
Log.LogLevel當前最小LogLevel顯示在 stdout 上。

打印和提示日誌

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

參數
logLevel Log.LogLevel

tag String

message String

打印日誌

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

參數
logLevel Log.LogLevel

tag String

message String

設置日誌級別

public void setLogLevel (Log.LogLevel logLevel)

參數
logLevel Log.LogLevel

設置日誌級別顯示

public void setLogLevelDisplay (Log.LogLevel logLevel)

設置在 stdout 上顯示的最小LogLevel

參數
logLevel Log.LogLevel

受保護的方法

寫入日誌

protected void writeToLog (String message)

將消息寫入輸出流。

參數
message String : 寫入日誌的條目

投擲
如果發生 I/O 錯誤