com.ooyala.android.util.DebugMode Class Reference

A tool that provides two new features: (1) Hiding all Ooyala debug logs, and (2) enforcing a "strict mode" to force runtime exceptions on assertions throughout the Ooyala SDK. More...

Classes

enum  Mode
 The logging mode that you'd like for the Ooyala SDK. More...
 

Static Public Member Functions

static Mode getMode ()
 Gets the debug mode that was set for the SDK. More...
 
static void setMode (Mode mode)
 Set the DebugMode that the SDK will execute with. More...
 
static void logI (String tag, String message)
 a DebugMode wrapper to Log.i More...
 
static void logI (String tag, String message, Throwable throwable)
 a DebugMode wrapper to Log.i More...
 
static void logW (String tag, String message)
 a DebugMode wrapper to Log.w More...
 
static void logW (String tag, String message, Throwable throwable)
 a DebugMode wrapper to Log.w More...
 
static void logD (String tag, String message)
 a DebugMode wrapper to Log.d More...
 
static void logD (String tag, String message, Throwable throwable)
 a DebugMode wrapper to Log.d More...
 
static void logV (String tag, String message)
 a DebugMode wrapper to Log.v More...
 
static void logV (String tag, String message, Throwable throwable)
 a DebugMode wrapper to Log.v More...
 
static void logE (String tag, String message)
 
static void logE (String tag, String message, Throwable throwable)
 a DebugMode wrapper to Log.d More...
 
static boolean assertEquals (Object a, Object b, String tag, String message)
 
static boolean assertCondition (boolean condition, String tag, String message)
 Assert that the condition returns true. More...
 
static void assertFail (String tag, String message)
 Used when the SDK comes across an error state. More...
 

Detailed Description

A tool that provides two new features: (1) Hiding all Ooyala debug logs, and (2) enforcing a "strict mode" to force runtime exceptions on assertions throughout the Ooyala SDK.

You can set your desired mode by calling DebugMode.setMode(DebugMode.mode);

Member Function Documentation

static boolean com.ooyala.android.util.DebugMode.assertCondition ( boolean  condition,
String  tag,
String  message 
)
static

Assert that the condition returns true.

If not, perform an action based on the DebugMode.Mode

Parameters
conditionThe boolean condition to assert on
tagthe Log tag
messagethe Log message
static boolean com.ooyala.android.util.DebugMode.assertEquals ( Object  a,
Object  b,
String  tag,
String  message 
)
static
static void com.ooyala.android.util.DebugMode.assertFail ( String  tag,
String  message 
)
static

Used when the SDK comes across an error state.

Equivalent to assertCondition(false, tag, message)

Parameters
tagthe Log tag
messagethe Log message
static Mode com.ooyala.android.util.DebugMode.getMode ( )
static

Gets the debug mode that was set for the SDK.

Returns
the currently active DebugMode
static void com.ooyala.android.util.DebugMode.logD ( String  tag,
String  message 
)
static

a DebugMode wrapper to Log.d

Parameters
taga Log tag
messagethe Log message
static void com.ooyala.android.util.DebugMode.logD ( String  tag,
String  message,
Throwable  throwable 
)
static

a DebugMode wrapper to Log.d

Parameters
taga Log tag
messagethe Log message
throwablea throwable to connect with the message
static void com.ooyala.android.util.DebugMode.logE ( String  tag,
String  message 
)
static
static void com.ooyala.android.util.DebugMode.logE ( String  tag,
String  message,
Throwable  throwable 
)
static

a DebugMode wrapper to Log.d

Parameters
taga Log tag
messagethe Log message
throwablea throwable to connect with the message
static void com.ooyala.android.util.DebugMode.logI ( String  tag,
String  message 
)
static

a DebugMode wrapper to Log.i

Parameters
taga Log tag
messagethe Log message
static void com.ooyala.android.util.DebugMode.logI ( String  tag,
String  message,
Throwable  throwable 
)
static

a DebugMode wrapper to Log.i

Parameters
taga Log tag
messagethe Log message
throwablea throwable to connect with the message
static void com.ooyala.android.util.DebugMode.logV ( String  tag,
String  message 
)
static

a DebugMode wrapper to Log.v

Parameters
taga Log tag
messagethe Log message
static void com.ooyala.android.util.DebugMode.logV ( String  tag,
String  message,
Throwable  throwable 
)
static

a DebugMode wrapper to Log.v

Parameters
taga Log tag
messagethe Log message
throwablea throwable to connect with the message
static void com.ooyala.android.util.DebugMode.logW ( String  tag,
String  message 
)
static

a DebugMode wrapper to Log.w

Parameters
taga Log tag
messagethe Log message
static void com.ooyala.android.util.DebugMode.logW ( String  tag,
String  message,
Throwable  throwable 
)
static

a DebugMode wrapper to Log.w

Parameters
taga Log tag
messagethe Log message
throwablea throwable to connect with the message
static void com.ooyala.android.util.DebugMode.setMode ( Mode  mode)
static

Set the DebugMode that the SDK will execute with.

Consult DebugMode.Mode for the different options

Parameters
modethe logging mode for the Ooyala SDK