com.nativex.common
Class Log

java.lang.Object
  extended by com.nativex.common.Log

public class Log
extends Object

This class is used to control debug messages to the console for OfferWall SDK related classes.


Field Summary
private static boolean showLog
          This flag determines if the SDK will send log messages to the device.
private static String TAG
          The tag to use with the SDK log messages.
 
Constructor Summary
Log()
           
 
Method Summary
static void a(String msg)
          Set a assert log message.
static void a(String msg, Throwable tr)
          Set a assert log message.
static void d(String msg)
          Set a debug log message.
static void d(String msg, Throwable tr)
          Set a debug log message.
static void e(String msg)
          Set a error log message.
static void e(String msg, Throwable tr)
          Set a error log message.
static void enableLogging(boolean enable)
          Enables or disables logging.
static void i(String msg)
          Set a info log message.
static void i(String msg, Throwable tr)
          Set a info log message.
static boolean isLogging()
          Checks if the SDK Log is enabled.
private static void print(int priority, String msg)
          Integrnal method.
private static void print(int priority, String msg, Throwable tr)
          Internal method.
This is the methods that does the printing of the log to the device.
static void v(String msg)
          Set a verbose log message.
static void v(String msg, Throwable tr)
          Set a verbose log message.
static void w(String msg)
          Set a warn log message.
static void w(String msg, Throwable tr)
          Set a warn log message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

showLog

private static boolean showLog
This flag determines if the SDK will send log messages to the device.


TAG

private static String TAG
The tag to use with the SDK log messages.

Constructor Detail

Log

public Log()
Method Detail

enableLogging

public static void enableLogging(boolean enable)
Enables or disables logging.


isLogging

public static boolean isLogging()
Checks if the SDK Log is enabled.

Returns:
Boolean. true - the SDK will send log messages, false - no log.

v

public static void v(String msg)
Set a verbose log message.

Parameters:
msg - Log message to output to the console.

v

public static void v(String msg,
                     Throwable tr)
Set a verbose log message.

Parameters:
msg - Log message to output to the console.
tr - A Throwable which stack trace will be printed.

d

public static void d(String msg)
Set a debug log message.

Parameters:
msg - Log message to output to the console.

d

public static void d(String msg,
                     Throwable tr)
Set a debug log message.

Parameters:
msg - Log message to output to the console.
tr - A Throwable which stack trace will be printed.

i

public static void i(String msg)
Set a info log message.

Parameters:
msg - Log message to output to the console.

i

public static void i(String msg,
                     Throwable tr)
Set a info log message.

Parameters:
msg - Log message to output to the console.
tr - A Throwable which stack trace will be printed.

w

public static void w(String msg)
Set a warn log message.

Parameters:
msg - Log message to output to the console.

w

public static void w(String msg,
                     Throwable tr)
Set a warn log message.

Parameters:
msg - Log message to output to the console.
tr - A Throwable which stack trace will be printed.

e

public static void e(String msg)
Set a error log message.

Parameters:
msg - Log message to output to the console.

e

public static void e(String msg,
                     Throwable tr)
Set a error log message.

Parameters:
msg - Log message to output to the console.
tr - A Throwable which stack trace will be printed.

a

public static void a(String msg)
Set a assert log message.

Parameters:
msg - Log message to output to the console.

a

public static void a(String msg,
                     Throwable tr)
Set a assert log message.

Parameters:
msg - Log message to output to the console.
tr - A Throwable which stack trace will be printed.

print

private static void print(int priority,
                          String msg,
                          Throwable tr)
Internal method.
This is the methods that does the printing of the log to the device. It uses the Log class printLn() to do so. This method allows printing exception stacktraces.

Parameters:
priority - The priority of the messages - VERBOSE, DEBUG, INFO, WARN, ERROR, ASSERT.
msg - The message to log.
tr - A Throwable to log. This is best used in a catch block.

print

private static void print(int priority,
                          String msg)
Integrnal method.
This is the methods that does the printing of the log to the device. It uses the Log class printLn() to do so.

Parameters:
priority - The priority of the messages - VERBOSE, DEBUG, INFO, WARN, ERROR, ASSERT.
msg - The message to log.