LogUtil

public class LogUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.log.LogUtil


ロギング ユーティリティ クラス。Log の静的メソッドをオーバーライドする必要があるコードに便利です。

概要

ネストされたクラス

class LogUtil.CLog

呼び出し元の単純なクラス名をログタグとして自動的に使用する Log のシムクラス

パブリック メソッド

static String getLogFormatString(Log.LogLevel logLevel, String tag, String message)

デバイスの「threadtime」ログ形式に似た形式文字列を作成します。

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

ログ メッセージの出力が必要な場合に送信されます。

パブリック メソッド

getLogFormatString

public static String getLogFormatString (Log.LogLevel logLevel, 
                String tag, 
                String message)

デバイスの「threadtime」ログ形式に似た形式文字列を作成します。この形式は、日と月が含まれているため(長時間実行される TF インスタンスの時間を区別するため)、特に便利です。また、24 時間形式を使用して、午前と午後を区別します。

パラメータ
logLevel Log.LogLevel

tag String

message String

戻り値
String

printLog

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

ログ メッセージの出力が必要な場合に送信されます。この実装では、すべての場合でメッセージが stdout に出力されます。

パラメータ
logLevel Log.LogLevel: メッセージの優先度を表す LogLevel 列挙型。

tag String: メッセージに関連付けられたタグ。

message String: 表示するメッセージ。