BaseStreamLogger

public abstract class BaseStreamLogger
extends BaseLeveledLogOutput

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


ILeveledLogOutput hướng dẫn thông điệp nhật ký đến luồng đầu ra và đến stdout.

Tóm tắt

Trường

protected OS extends OutputStream mOutputStream

Hàm khởi tạo công khai

BaseStreamLogger()

Phương thức công khai

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)

Để đảm bảo khả năng tương thích

void setLogLevelDisplay(Log.LogLevel logLevel)

Đặt LogLevel tối thiểu để hiển thị trên stdout.

Phương thức được bảo vệ

void writeToLog(String message)

Ghi một thông điệp vào luồng đầu ra.

Trường

mOutputStream

protected OS extends OutputStream mOutputStream

Hàm khởi tạo công khai

BaseStreamLogger

public BaseStreamLogger ()

Phương thức công khai

closeLog

public void closeLog ()

getLogLevel

public Log.LogLevel getLogLevel ()

Giá trị trả về
Log.LogLevel

getLogLevelDisplay

public Log.LogLevel getLogLevelDisplay ()

Giá trị trả về
Log.LogLevel LogLevel tối thiểu hiện tại để hiển thị trên stdout.

printAndPromptLog

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

Tham số
logLevel Log.LogLevel

tag String

message String

printLog

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

Tham số
logLevel Log.LogLevel

tag String

message String

setLogLevel

public void setLogLevel (Log.LogLevel logLevel)

Tham số
logLevel Log.LogLevel

setLogLevelDisplay

public void setLogLevelDisplay (Log.LogLevel logLevel)

Để đảm bảo khả năng tương thích

Tham số
logLevel Log.LogLevel

setLogLevelDisplay

public void setLogLevelDisplay (Log.LogLevel logLevel)

Đặt LogLevel tối thiểu để hiển thị trên stdout.

Tham số
logLevel Log.LogLevel

Phương thức được bảo vệ

writeToLog

protected void writeToLog (String message)

Ghi một thông điệp vào luồng đầu ra.

Tham số
message String: mục nhập cần ghi vào nhật ký

Gửi
nếu xảy ra lỗi I/O