LogUtil
public class LogUtil
extends Object
java.lang.Object | |
com.android.tradefed.log.LogUtil |
Klasa narzędzia do rejestrowania. Przydatne w przypadku kodu, który musi zastąpić metody statyczne z Log
Streszczenie
Klasy zagnieżdżone | |
---|---|
class | LogUtil.CLog Klasa podkładki dla |
Metody publiczne | |
---|---|
static String | getLogFormatString (Log.LogLevel logLevel, String tag, String message) Tworzy ciąg formatu podobny do formatu dziennika „threadtime” na urządzeniu. |
static void | printLog (Log.LogLevel logLevel, String tag, String message) Wysyłane, gdy trzeba wydrukować komunikat dziennika. |
Metody publiczne
getLogFormatString
public static String getLogFormatString (Log.LogLevel logLevel, String tag, String message)
Tworzy ciąg formatu podobny do formatu dziennika „threadtime” na urządzeniu. Jest to szczególnie przydatne, ponieważ obejmuje dzień i miesiąc (aby odróżnić czasy dla długotrwałych instancji TF), a także wykorzystuje czas 24-godzinny do odróżnienia poranka od wieczoru.
Parametry | |
---|---|
logLevel | Log.LogLevel |
tag | String |
message | String |
Zwroty | |
---|---|
String |
Zobacz też:
printLog
public static void printLog (Log.LogLevel logLevel, String tag, String message)
Wysyłane, gdy trzeba wydrukować komunikat dziennika. Ta implementacja drukuje komunikat na standardowe wyjście we wszystkich przypadkach.
Parametry | |
---|---|
logLevel | Log.LogLevel : wyliczenie LogLevel reprezentujące priorytet wiadomości. |
tag | String : tag skojarzony z wiadomością. |
message | String : komunikat do wyświetlenia. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2022-08-15 UTC.