StdoutLogger
public class StdoutLogger
extends Object
implements ILeveledLogOutput
java.lang.Obiekt | |
↳ | com.android.tradefed.log.StdoutLogger |
ILeveledLogOutput
, który kieruje komunikaty dziennika do stdout.
Streszczenie
Konstruktory publiczne | |
---|---|
StdoutLogger () |
Metody publiczne | |
---|---|
ILeveledLogOutput | clone () |
void | closeLog () Zamyka dziennik i w razie potrzeby przeprowadza czyszczenie przed zamknięciem. |
InputStreamSource | getLog () Przechwytuje strumień migawki danych dziennika. |
Log.LogLevel | getLogLevel () Pobiera minimalny poziom dziennika do wyświetlenia. |
void | init () Zainicjuj dziennik, tworząc wszystkie 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. |
Konstruktory publiczne
StdoutLogger
public StdoutLogger ()
Metody publiczne
zamknijLog
public void closeLog ()
Zamyka dziennik i w razie potrzeby przeprowadza czyszczenie przed zamknięciem.
getLog
public InputStreamSource getLog ()
Przechwytuje strumień migawki danych dziennika.
Nie może być wywoływana po ILeveledLogOutput#closeLog()
.
Zwrócony strumień nie gwarantuje optymalnej wydajności. Dzwoniący mogą chcieć zawinąć wynik w ERROR(/BufferedInputStream)
.
Zwroty | |
---|---|
InputStreamSource | InputStreamSource danych dziennika. Może zwrócić wartość null, jeśli nie jest obsługiwana. |
pobierz poziom dziennika
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 wszystkie 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 |