StdoutLogger
public class StdoutLogger
extends Object
implements ILeveledLogOutput
Obiekt Java.lang.Object | |
↳ | com.android.tradefed.log.StdoutLogger |
ILeveledLogOutput
, który kieruje komunikaty dziennika na standardowe wyjście.
Streszczenie
Konstruktorzy publiczni | |
---|---|
StdoutLogger () |
Metody publiczne | |
---|---|
ILeveledLogOutput | clone () |
void | closeLog () Zamyka dziennik i, jeśli to konieczne, przeprowadza czyszczenie przed zamknięciem. |
InputStreamSource | getLog () Pobiera strumień migawki danych dziennika. |
Log.LogLevel | getLogLevel () Pobiera minimalny poziom dziennika do wyświetlenia. |
void | init () Zainicjuj dziennik, tworząc wymagane zasoby we/wy. |
void | printAndPromptLog (Log.LogLevel logLevel, String tag, String message) |
void | printLog (Log.LogLevel logLevel, String tag, String message) |
void | setLogLevel (Log.LogLevel logLevel) Ustawia minimalny poziom rejestrowania do wyświetlenia. |
Konstruktorzy publiczni
StdoutLogger
public StdoutLogger ()
Metody publiczne
zamknijLog
public void closeLog ()
Zamyka dziennik i, jeśli to konieczne, przeprowadza czyszczenie przed zamknięciem.
pobierz Log
public InputStreamSource getLog ()
Pobiera strumień migawki danych dziennika.
Nie można wywoływać po ILeveledLogOutput#closeLog()
.
Nie ma gwarancji, że zwrócony strumień będzie miał optymalną wydajność. Osoby wywołujące mogą chcieć zawijać wynik w ERROR(/BufferedInputStream)
.
Zwroty | |
---|---|
InputStreamSource | InputStreamSource danych dziennika. Może zwrócić wartość null, jeśli nie jest obsługiwana. |
pobierz poziom logu
public Log.LogLevel getLogLevel ()
Pobiera minimalny poziom dziennika do wyświetlenia.
Zwroty | |
---|---|
Log.LogLevel | bieżący LogLevel |
w tym
public void init ()
Zainicjuj dziennik, tworząc wymagane zasoby we/wy.
printAndPromptLog
public void printAndPromptLog (Log.LogLevel logLevel, String tag, String message)
Parametry | |
---|---|
logLevel | Log.LogLevel |
tag | String |
message | String |
drukujLog
public void printLog (Log.LogLevel logLevel, String tag, String message)
Parametry | |
---|---|
logLevel | Log.LogLevel |
tag | String |
message | String |
ustaw poziom dziennika
public void setLogLevel (Log.LogLevel logLevel)
Ustawia minimalny poziom rejestrowania do wyświetlenia.
Parametry | |
---|---|
logLevel | Log.LogLevel : LogLevel do wyświetlenia |