ログ

public final class Log
extends Object

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


メインの Android ソースの API をミラーリングするログクラス。

デフォルトの動作では、ログが System.out に出力されます。setLogOutput(com.android.tradefed.log.Log.ILogOutput) を使用して、ログを別の場所にリダイレクトします。

概要

ネストされたクラス

interface Log.ILogOutput

このインターフェースを実装するクラスは、ログ メッセージの出力を処理するメソッドを提供します。 

パブリック メソッド

static void d(String tag, String message)

LogLevel.DEBUG レベルのメッセージを出力します。

static void e(String tag, String message)

LogLevel.ERROR レベルのメッセージを出力します。

static void e(String tag, Throwable throwable)

LogLevel.ERROR レベルの Throwable 情報を出力します。

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

ログメッセージをフォーマットします。

static void i(String tag, String message)

LogLevel.INFO レベルのメッセージを出力します。

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

ログ メッセージを出力し、ダイアログに表示しようとします。

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

ログ メッセージを出力します。

static void setLogOutput(Log.ILogOutput logOutput)

ログの出力に使用する ILogOutput を設定します。

static void v(String tag, String message)

LogLevel.VERBOSE レベルのメッセージを出力します。

static void w(String tag, String message)

LogLevel.WARN レベルのメッセージを出力します。

パブリック メソッド

d

public static void d (String tag, 
                String message)

LogLevel.DEBUG レベルのメッセージを出力します。

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

message String: 出力するメッセージ。

e

public static void e (String tag, 
                String message)

LogLevel.ERROR レベルのメッセージを出力します。

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

message String: 出力するメッセージ。

e

public static void e (String tag, 
                Throwable throwable)

LogLevel.ERROR レベルの Throwable 情報を出力します。

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

throwable Throwable: 出力する Throwable

getLogFormatString

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

ログメッセージをフォーマットします。

戻り値
String

i

public static void i (String tag, 
                String message)

LogLevel.INFO レベルのメッセージを出力します。

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

message String: 出力するメッセージ。

logAndDisplay

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

ログ メッセージを出力し、ダイアログに表示しようとします。

パラメータ
logLevel Log.LogLevel

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

message String: 出力するメッセージ。

printLog

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

ログ メッセージを出力します。

setLogOutput

public static void setLogOutput (Log.ILogOutput logOutput)

ログの出力に使用する ILogOutput を設定します。設定しない場合、System.out が使用されます。

パラメータ
logOutput Log.ILogOutput: ログの出力に使用する ILogOutput

v

public static void v (String tag, 
                String message)

LogLevel.VERBOSE レベルのメッセージを出力します。

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

message String: 出力するメッセージ。

w

public static void w (String tag, 
                String message)

LogLevel.WARN レベルのメッセージを出力します。

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

message String: 出力するメッセージ。