com.sybase.uep.bobclient.data
Class AppLoggerWrapper

java.lang.Object
  extended by com.sybase.uep.bobclient.data.AppLoggerWrapper
All Implemented Interfaces:
net.rim.device.api.system.GlobalEventListener
Direct Known Subclasses:
OptionAppLoggerWrapper

public class AppLoggerWrapper
extends java.lang.Object
implements net.rim.device.api.system.GlobalEventListener

To wrap the concrete logger implementation of Object API

Author:
luox

Field Summary
protected static java.lang.String _appID
           
protected  LogConfig _logConfig
           
static long KEY
           
 
Constructor Summary
protected AppLoggerWrapper()
           
 
Method Summary
 void debug(java.lang.String message)
          Logs the message as debug information
 void error(java.lang.String message)
          Logs the message as error information
 void eventOccurred(long guid, int currentLevel, int arg2, java.lang.Object appID, java.lang.Object arg4)
           
 void fatal(java.lang.String message)
          Logs the message as fatal information
protected static java.lang.String getAppID()
           
static AppLoggerWrapper getInstance(java.lang.String appID)
          Gets a instance of application log wrapper from the given appID
 void info(java.lang.String message)
          Logs the message as information
 boolean isDebug()
          Checks if a message of the debug level would actually be logged by this logger wrapper.
 boolean isError()
          Checks if a message of the error level would actually be logged by this logger wrapper.
 boolean isFatal()
          Checks if a message of the fatal level would actually be logged by this logger wrapper.
 boolean isInfo()
          Checks if a message of the info level would actually be logged by this logger wrapper.
 boolean isWarn()
          Checks if a message of the warning level would actually be logged by this logger wrapper.
 net.rim.device.api.collection.Collection loadLogs()
          Returns all the application log entries that are related to the current device and application
protected static void setAppID(java.lang.String appID)
           
protected  void setLoggerLevel()
           
 void warn(java.lang.String message)
          Logs the message as warn information
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_appID

protected static java.lang.String _appID

_logConfig

protected LogConfig _logConfig

KEY

public static final long KEY
See Also:
Constant Field Values
Constructor Detail

AppLoggerWrapper

protected AppLoggerWrapper()
Method Detail

getInstance

public static AppLoggerWrapper getInstance(java.lang.String appID)
Gets a instance of application log wrapper from the given appID

Parameters:
appID - The ID of application
Returns:
AppLoggerWrapper The wrapper of concrete logger implementation

debug

public void debug(java.lang.String message)
Logs the message as debug information

Parameters:
message - The debug information will be logged

info

public void info(java.lang.String message)
Logs the message as information

Parameters:
message - The information will be logged

warn

public void warn(java.lang.String message)
Logs the message as warn information

Parameters:
message - The warn information will be logged

error

public void error(java.lang.String message)
Logs the message as error information

Parameters:
message - The error information will be logged

fatal

public void fatal(java.lang.String message)
Logs the message as fatal information

Parameters:
message - The fatal information will be logged

loadLogs

public net.rim.device.api.collection.Collection loadLogs()
Returns all the application log entries that are related to the current device and application

Returns:

isDebug

public boolean isDebug()
Checks if a message of the debug level would actually be logged by this logger wrapper.

Returns:

isInfo

public boolean isInfo()
Checks if a message of the info level would actually be logged by this logger wrapper.

Returns:

isWarn

public boolean isWarn()
Checks if a message of the warning level would actually be logged by this logger wrapper.

Returns:

isError

public boolean isError()
Checks if a message of the error level would actually be logged by this logger wrapper.

Returns:

isFatal

public boolean isFatal()
Checks if a message of the fatal level would actually be logged by this logger wrapper.

Returns:

setLoggerLevel

protected void setLoggerLevel()

getAppID

protected static java.lang.String getAppID()

setAppID

protected static void setAppID(java.lang.String appID)

eventOccurred

public void eventOccurred(long guid,
                          int currentLevel,
                          int arg2,
                          java.lang.Object appID,
                          java.lang.Object arg4)
Specified by:
eventOccurred in interface net.rim.device.api.system.GlobalEventListener