public final class CBLogging
extends java.lang.Object
Generally, use the CBLogging.v() CBLogging.d() CBLogging.i() CBLogging.w() and CBLogging.e() methods.
The order in terms of verbosity, from least to most is ERROR, WARN, INFO, DEBUG, VERBOSE.
Tip: A good convention is to declare a TAG constant
in your class:
private static final String TAG = "MyActivity";and use that in subsequent calls to the log methods.
Tip: Don't forget that when you make a call like
Log.v(TAG, "index=" + i);that when you're building the string to pass into Log.d, the compiler uses a StringBuilder and at least three allocations occur: the StringBuilder itself, the buffer, and the String object. Realistically, there is also another buffer allocation and copy, and even more pressure on the gc. That means that if your log message is filtered out, you might be doing significant work and incurring significant overhead.
| Modifier and Type | Class and Description |
|---|---|
static class |
CBLogging.Level
Enum describing what is logged by the Chartboost SDK
|
| Modifier and Type | Field and Description |
|---|---|
static CBLogging.Level |
level
Private boolean variable to enable and disable logging
|
| Modifier and Type | Method and Description |
|---|---|
static void |
d(java.lang.String tag,
java.lang.String msg)
Send a
android.util.Log log message. |
static void |
d(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send a
android.util.Log log message and log the exception. |
static void |
e(java.lang.String tag,
java.lang.String msg)
Send an
android.util.Log log message. |
static void |
e(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send a
android.util.Log log message and log the exception. |
static void |
i(java.lang.String tag,
java.lang.String msg)
Send an
android.util.Log log message. |
static void |
i(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send a
android.util.Log log message and log the exception. |
static void |
integrationError(java.lang.String msg)
Send an
android.util.Log integration log message. |
static void |
integrationWarning(java.lang.String msg)
Send an
android.util.Log integration log message. |
static void |
v(java.lang.String tag,
java.lang.String msg)
Send a
android.util.Log log message. |
static void |
v(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send a
android.util.Log log message and log the exception. |
static void |
w(java.lang.String tag,
java.lang.String msg)
Send a
android.util.Log log message. |
static void |
w(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
Send a
android.util.Log log message and log the exception. |
static void |
wtf(java.lang.String tag,
java.lang.String msg)
What a Terrible Failure: Report a condition that should never happen.
|
static void |
wtf(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
What a Terrible Failure: Report an exception that should never happen.
|
public static CBLogging.Level level
public static void integrationError(java.lang.String msg)
android.util.Log integration log message.msg - The message you would like logged. It cannot be nullpublic static void integrationWarning(java.lang.String msg)
android.util.Log integration log message.msg - The message you would like logged. It cannot be nullpublic static void d(java.lang.String tag,
java.lang.String msg)
android.util.Log 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. It cannot be nullpublic static void d(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
android.util.Log 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. It cannot be nulltr - An exception to logpublic static void e(java.lang.String tag,
java.lang.String msg)
android.util.Log 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.It cannot be nullpublic static void e(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
android.util.Log 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. It cannot be nulltr - An exception to logpublic static void v(java.lang.String tag,
java.lang.String msg)
android.util.Log 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. It cannot be nullpublic static void v(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
android.util.Log 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. It cannot be nulltr - An exception to logpublic static void w(java.lang.String tag,
java.lang.String msg)
android.util.Log 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. It cannot be nullpublic static void w(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
android.util.Log 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. It cannot be nulltr - An exception to logpublic static void i(java.lang.String tag,
java.lang.String msg)
android.util.Log 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. It cannot be nullpublic static void i(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
android.util.Log 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. It cannot be nulltr - An exception to logpublic static void wtf(java.lang.String tag,
java.lang.String msg)
android.os.DropBoxManager and/or the process may be terminated
immediately with an error dialog.tag - Used to identify the source of a log message.msg - The message you would like logged. It cannot be nullpublic static void wtf(java.lang.String tag,
java.lang.String msg,
java.lang.Throwable tr)
#wtf(Object, String), with a message as well.tag - Used to identify the source of a log message.msg - The message you would like logged. It cannot be null.tr - An exception to log. May be null.