docs/doc/reference/com/google/android/exoplayer2/util/Log.html
Package com.google.android.exoplayer2.util
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classLogextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Wrapper around Log which allows to set the log level and to specify a custom log output.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | Log.Logger |
Deprecated.
Interface for a logger that can output messages with a tag.
|
| static interface | Log.LogLevel |
Deprecated.
Log level for ExoPlayer logcat logging. |
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static int | LOG_LEVEL_ALL |
Deprecated.
Log level to log all messages.
|
| static int | LOG_LEVEL_ERROR |
Deprecated.
Log level to only log error messages.
|
| static int | LOG_LEVEL_INFO |
Deprecated.
Log level to only log informative, warning and error messages.
|
| static int | LOG_LEVEL_OFF |
Deprecated.
Log level to disable all logging.
|
| static int | LOG_LEVEL_WARNING |
Deprecated.
Log level to only log warning and error messages. |
All Methods Static Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static void | d(String tag, String message) |
Deprecated.
|
| static void | d(String tag, String message, Throwable throwable) |
Deprecated.
|
| static void | e(String tag, String message) |
Deprecated.
|
| static void | e(String tag, String message, Throwable throwable) |
Deprecated.
|
| static @com.google.android.exoplayer2.util.Log.LogLevel int | getLogLevel() |
Deprecated.
Returns current Log.LogLevel for ExoPlayer logcat logging.
|
| static String | getThrowableString(Throwable throwable) |
Deprecated.
Returns a string representation of a Throwable suitable for logging, taking into account whether setLogStackTraces(boolean) stack trace logging} is enabled.
|
| static void | i(String tag, String message) |
Deprecated.
|
| static void | i(String tag, String message, Throwable throwable) |
Deprecated.
|
| static void | setLogger(Log.Logger logger) |
Deprecated.
Sets a custom Log.Logger as the output.
|
| static void | setLogLevel(@com.google.android.exoplayer2.util.Log.LogLevel int logLevel) |
Deprecated.
Sets the Log.LogLevel for ExoPlayer logcat logging.
|
| static void | setLogStackTraces(boolean logStackTraces) |
Deprecated.
Sets whether stack traces of Throwables will be logged to logcat.
|
| static void | w(String tag, String message) |
Deprecated.
|
| static void | w(String tag, String message, Throwable throwable) |
Deprecated.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final int LOG_LEVEL_ALL
Deprecated.
Log level to log all messages. See Also:Constant Field Values
-
public static final int LOG_LEVEL_INFO
Deprecated.
Log level to only log informative, warning and error messages. See Also:Constant Field Values
-
public static final int LOG_LEVEL_WARNING
Deprecated.
Log level to only log warning and error messages. See Also:Constant Field Values
-
public static final int LOG_LEVEL_ERROR
Deprecated.
Log level to only log error messages. See Also:Constant Field Values
-
public static final int LOG_LEVEL_OFF
Deprecated.
Log level to disable all logging. See Also:Constant Field Values
-
@Pure
public static @com.google.android.exoplayer2.util.Log.LogLevel int getLogLevel()
Deprecated.
Returns current Log.LogLevel for ExoPlayer logcat logging.
-
public static void setLogLevel(@com.google.android.exoplayer2.util.Log.LogLevel int logLevel)
Deprecated.
Sets the Log.LogLevel for ExoPlayer logcat logging.
Parameters:logLevel - The new Log.LogLevel.
-
public static void setLogStackTraces(boolean logStackTraces)
Deprecated.
Sets whether stack traces of Throwables will be logged to logcat. Stack trace logging is enabled by default.
Parameters:logStackTraces - Whether stack traces will be logged.
-
public static void setLogger([Log.Logger](Log.Logger.html "interface in com.google.android.exoplayer2.util")logger)
Deprecated.
Sets a custom Log.Logger as the output.
Parameters:logger - The Log.Logger.
-
@Pure
public static void d(@Size(max=23L)[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")tag,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")message)
Deprecated.
See Also:Log.d(String, String)
-
@Pure
public static void d(@Size(max=23L)[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")tag,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")message,
@Nullable[Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")throwable)
Deprecated.
See Also:Log.d(String, String, Throwable)
-
@Pure
public static void i(@Size(max=23L)[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")tag,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")message)
Deprecated.
See Also:Log.i(String, String)
-
@Pure
public static void i(@Size(max=23L)[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")tag,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")message,
@Nullable[Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")throwable)
Deprecated.
See Also:Log.i(String, String, Throwable)
-
@Pure
public static void w(@Size(max=23L)[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")tag,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")message)
Deprecated.
See Also:Log.w(String, String)
-
@Pure
public static void w(@Size(max=23L)[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")tag,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")message,
@Nullable[Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")throwable)
Deprecated.
See Also:Log.w(String, String, Throwable)
-
@Pure
public static void e(@Size(max=23L)[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")tag,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")message)
Deprecated.
See Also:Log.e(String, String)
-
@Pure
public static void e(@Size(max=23L)[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")tag,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")message,
@Nullable[Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")throwable)
Deprecated.
See Also:Log.e(String, String, Throwable)
-
@Nullable
@Pure
public static[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")getThrowableString(@Nullable[Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")throwable)
Deprecated.
Returns a string representation of a Throwable suitable for logging, taking into account whether setLogStackTraces(boolean) stack trace logging} is enabled.
Stack trace logging may be unconditionally suppressed for some expected failure modes (e.g., Throwables that are expected if the device doesn't have network connectivity) to avoid log spam.
Parameters:throwable - The Throwable.Returns:The string representation of the Throwable.