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: 表示するメッセージ。