public final class Log
extends java.lang.Object
修飾子とタイプ | フィールドと説明 |
---|---|
static int |
ASSERT
Priority constant for the println method.
|
static int |
DEBUG
Priority constant for the println method; use Log.d.
|
static java.lang.String |
encoding
ログファイルのエンコーディング。
|
static int |
ERROR
Priority constant for the println method; use Log.e.
|
static int |
INFO
Priority constant for the println method; use Log.i.
|
static int |
LOG_ID_CRASH |
static int |
LOG_ID_EVENTS |
static int |
LOG_ID_MAIN |
static int |
LOG_ID_RADIO |
static int |
LOG_ID_SYSTEM |
static java.lang.String |
outputTag
タグ(クラスの完全名+メソッド名)で表示するメッセージを限定したいなら設定する。
|
static int |
VERBOSE
Priority constant for the println method; use Log.v.
|
static int |
WARN
Priority constant for the println method; use Log.w.
|
修飾子とタイプ | メソッドと説明 |
---|---|
static void |
close()
ログファイルをクローズする。
|
static int |
d(java.lang.String tag,
java.lang.String msg)
Send a
DEBUG log message. |
static int |
d(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send a
DEBUG log message and log the exception. |
static int |
e(java.lang.String tag,
java.lang.String msg)
Send an
ERROR log message. |
static int |
e(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send a
ERROR log message and log the exception. |
static java.lang.String |
getLogFileName()
ログファイル名を取得する。
|
static int |
getOutputMinPriority()
ログレベル(数値)を取得する。
|
static java.lang.String |
getStackTraceString(java.lang.Throwable tr)
Handy function to get a loggable stack trace from a Throwable
|
static int |
i(java.lang.String tag,
java.lang.String msg)
Send an
INFO log message. |
static int |
i(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send a
INFO log message and log the exception. |
static int |
println(int bufID,
int priority,
java.lang.String tag,
java.lang.String msg)
ログをファイルに書き出す。
|
static int |
println(int priority,
java.lang.String tag,
java.lang.String msg)
Low-level logging call.
|
static void |
setLogFileName(java.lang.String name)
ログファイル名を設定する。
|
static void |
setOutputMinPriority(int outputMinPriority)
ログレベル(数値)を設定する。
|
static int |
v(java.lang.String tag,
java.lang.String msg)
Send a
VERBOSE log message. |
static int |
v(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send a
VERBOSE log message and log the exception. |
static int |
w(java.lang.String tag,
java.lang.String msg)
Send a
WARN log message. |
static int |
w(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send a
WARN log message and log the exception. |
static int |
w(java.lang.String tag,
java.lang.Throwable tr) |
public static java.lang.String encoding
public static final int VERBOSE
public static final int DEBUG
public static final int INFO
public static final int WARN
public static final int ERROR
public static final int ASSERT
public static java.lang.String outputTag
public static final int LOG_ID_MAIN
public static final int LOG_ID_RADIO
public static final int LOG_ID_EVENTS
public static final int LOG_ID_SYSTEM
public static final int LOG_ID_CRASH
public static void close()
public static int getOutputMinPriority()
public static void setOutputMinPriority(int outputMinPriority)
outputMinPriority
- ログレベル(数値)public static void setLogFileName(java.lang.String name)
name
- ログファイル名public static java.lang.String getLogFileName()
public static int v(java.lang.String tag, java.lang.String msg)
VERBOSE
log message.tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.public static int v(java.lang.String tag, java.lang.String msg, java.lang.Throwable tr)
VERBOSE
log message and log the exception.tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.tr
- An exception to logpublic static int d(java.lang.String tag, java.lang.String msg)
DEBUG
log message.tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.public static int d(java.lang.String tag, java.lang.String msg, java.lang.Throwable tr)
DEBUG
log message and log the exception.tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.tr
- An exception to logpublic static int i(java.lang.String tag, java.lang.String msg)
INFO
log message.tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.public static int i(java.lang.String tag, java.lang.String msg, java.lang.Throwable tr)
INFO
log message and log the exception.tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.tr
- An exception to logpublic static int w(java.lang.String tag, java.lang.String msg)
WARN
log message.tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.public static int w(java.lang.String tag, java.lang.String msg, java.lang.Throwable tr)
WARN
log message and log the exception.tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.tr
- An exception to logpublic static int w(java.lang.String tag, java.lang.Throwable tr)
public static int e(java.lang.String tag, java.lang.String msg)
ERROR
log message.tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.public static int e(java.lang.String tag, java.lang.String msg, java.lang.Throwable tr)
ERROR
log message and log the exception.tag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.tr
- An exception to logpublic static java.lang.String getStackTraceString(java.lang.Throwable tr)
tr
- An exception to logpublic static int println(int priority, java.lang.String tag, java.lang.String msg)
priority
- The priority/type of this log messagetag
- Used to identify the source of a log message. It usually identifies
the class or activity where the log call occurs.msg
- The message you would like logged.public static int println(int bufID, int priority, java.lang.String tag, java.lang.String msg)
bufID
- priority
- tag
- msg
-