基本流記錄器

public abstract class BaseStreamLogger
extends BaseLeveledLogOutput

對象
com.android.tradefed.log.BaseLeveledLogOutput
com.android.tradefed.log.BaseStreamLogger<OS extends OutputStream>


ILeveledLogOutput引導日誌消息到輸出流和到stdout。

概括

字段

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)

設置最低LogLevel顯示在標準輸出上。

受保護的方法

void writeToLog (String message)

將消息寫入輸出流。

字段

輸出流

protected OS extends OutputStream mOutputStream

公共構造函數

基本流記錄器

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)

設置最低LogLevel顯示在標準輸出上。

參數
logLevel Log.LogLevel

受保護的方法

寫入日誌

protected void writeToLog (String message)

將消息寫入輸出流。

參數
message String :項寫入日誌

投擲
如果發生 I/O 錯誤