Class Log
- java.lang.Object
-
- com.google.android.exoplayer2.util.Log
-
@Deprecated public final class Log extends Object
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 aroundLogwhich allows to set the log level and to specify a custom log output.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceLog.LoggerDeprecated.Interface for a logger that can output messages with a tag.static interfaceLog.LogLevelDeprecated.Log level for ExoPlayer logcat logging.
-
Field Summary
Fields Modifier and Type Field Description static intLOG_LEVEL_ALLDeprecated.Log level to log all messages.static intLOG_LEVEL_ERRORDeprecated.Log level to only log error messages.static intLOG_LEVEL_INFODeprecated.Log level to only log informative, warning and error messages.static intLOG_LEVEL_OFFDeprecated.Log level to disable all logging.static intLOG_LEVEL_WARNINGDeprecated.Log level to only log warning and error messages.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidd(String tag, String message)Deprecated.static voidd(String tag, String message, Throwable throwable)Deprecated.static voide(String tag, String message)Deprecated.static voide(String tag, String message, Throwable throwable)Deprecated.static @com.google.android.exoplayer2.util.Log.LogLevel intgetLogLevel()Deprecated.Returns currentLog.LogLevelfor ExoPlayer logcat logging.static StringgetThrowableString(Throwable throwable)Deprecated.Returns a string representation of aThrowablesuitable for logging, taking into account whethersetLogStackTraces(boolean)stack trace logging} is enabled.static voidi(String tag, String message)Deprecated.static voidi(String tag, String message, Throwable throwable)Deprecated.static voidsetLogger(Log.Logger logger)Deprecated.Sets a customLog.Loggeras the output.static voidsetLogLevel(@com.google.android.exoplayer2.util.Log.LogLevel int logLevel)Deprecated.Sets theLog.LogLevelfor ExoPlayer logcat logging.static voidsetLogStackTraces(boolean logStackTraces)Deprecated.Sets whether stack traces ofThrowables will be logged to logcat.static voidw(String tag, String message)Deprecated.static voidw(String tag, String message, Throwable throwable)Deprecated.
-
-
-
Field Detail
-
LOG_LEVEL_ALL
public static final int LOG_LEVEL_ALL
Deprecated.Log level to log all messages.- See Also:
- Constant Field Values
-
LOG_LEVEL_INFO
public static final int LOG_LEVEL_INFO
Deprecated.Log level to only log informative, warning and error messages.- See Also:
- Constant Field Values
-
LOG_LEVEL_WARNING
public static final int LOG_LEVEL_WARNING
Deprecated.Log level to only log warning and error messages.- See Also:
- Constant Field Values
-
LOG_LEVEL_ERROR
public static final int LOG_LEVEL_ERROR
Deprecated.Log level to only log error messages.- See Also:
- Constant Field Values
-
LOG_LEVEL_OFF
public static final int LOG_LEVEL_OFF
Deprecated.Log level to disable all logging.- See Also:
- Constant Field Values
-
-
Method Detail
-
getLogLevel
@Pure public static @com.google.android.exoplayer2.util.Log.LogLevel int getLogLevel()
Deprecated.Returns currentLog.LogLevelfor ExoPlayer logcat logging.
-
setLogLevel
public static void setLogLevel(@com.google.android.exoplayer2.util.Log.LogLevel int logLevel)
Deprecated.Sets theLog.LogLevelfor ExoPlayer logcat logging.- Parameters:
logLevel- The newLog.LogLevel.
-
setLogStackTraces
public static void setLogStackTraces(boolean logStackTraces)
Deprecated.Sets whether stack traces ofThrowables will be logged to logcat. Stack trace logging is enabled by default.- Parameters:
logStackTraces- Whether stack traces will be logged.
-
setLogger
public static void setLogger(Log.Logger logger)
Deprecated.Sets a customLog.Loggeras the output.- Parameters:
logger- TheLog.Logger.
-
d
@Pure public static void d(@Size(max=23L) String tag, String message)Deprecated.- See Also:
Log.d(String, String)
-
d
@Pure public static void d(@Size(max=23L) String tag, String message, @Nullable Throwable throwable)Deprecated.- See Also:
Log.d(String, String, Throwable)
-
i
@Pure public static void i(@Size(max=23L) String tag, String message)Deprecated.- See Also:
Log.i(String, String)
-
i
@Pure public static void i(@Size(max=23L) String tag, String message, @Nullable Throwable throwable)Deprecated.- See Also:
Log.i(String, String, Throwable)
-
w
@Pure public static void w(@Size(max=23L) String tag, String message)Deprecated.- See Also:
Log.w(String, String)
-
w
@Pure public static void w(@Size(max=23L) String tag, String message, @Nullable Throwable throwable)Deprecated.- See Also:
Log.w(String, String, Throwable)
-
e
@Pure public static void e(@Size(max=23L) String tag, String message)Deprecated.- See Also:
Log.e(String, String)
-
e
@Pure public static void e(@Size(max=23L) String tag, String message, @Nullable Throwable throwable)Deprecated.- See Also:
Log.e(String, String, Throwable)
-
getThrowableString
@Nullable @Pure public static String getThrowableString(@Nullable Throwable throwable)
Deprecated.Returns a string representation of aThrowablesuitable for logging, taking into account whethersetLogStackTraces(boolean)stack trace logging} is enabled.Stack trace logging may be unconditionally suppressed for some expected failure modes (e.g.,
Throwablesthat are expected if the device doesn't have network connectivity) to avoid log spam.
-
-