ログ

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 addLogger(Log.ILogOutput logOutput)
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 removeLogger(Log.ILogOutput logOutput)
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 レベルのメッセージを出力します。

パブリック メソッド

addLogger

public static void addLogger (Log.ILogOutput logOutput)

パラメータ
logOutput Log.ILogOutput

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)

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

removeLogger

public static void removeLogger (Log.ILogOutput logOutput)

パラメータ
logOutput Log.ILogOutput

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