SDMLogger

The SDMLogger architecture follows the logging implementation in Java 1.5 and provides the same services and structures, but also contains BlackBerry and OData SDK specific implementations.

The component provides the following features:
  • Filtering: the client app can set the log level. Provides filterable log retrieval by component and by timestamp (from-to).
  • Formatting: before the log message is sent to the handler (which performs the logging), there is a possibility to format the message.
  • Handlers: handlers are responsible for logging the messages to the specified place. Depending on the implementation of the handler, the place can be the memory, a file, or the message can be sent to the server. Changing the default handlers in the Logger implementation is invisible for the client.
Current implementation contains implementation for all the interfaces (the IFilter, IHandler and IFormatter). These classes begin with the “Default” prefix.

SDMLogger Public APIs

ISDMLogger

ISDMPreferences getPreferences()
void entering(String sourceClass, String sourceMethod)
void entering(String sourceClass, String sourceMethod, Object param1)
void entering(String sourceClass, String sourceMethod,
			Object[] params)
void exiting(String sourceClass, String sourceMethod)
void exiting(String sourceClass, String sourceMethod, Object result)
void fine(String msg)
void finer(String msg)
void info(String msg)
void log(final int level, String msg)
void log(final int level, String msg, final Object param1)
void log(final int level, String msg, Object[] params)
void log(final int level, String msg, Throwable thrown)
void log(final int level, final String message, final Exception ex)
void logNestedObjects(final int level, String message,
			final Object[] params)
void setHandler(IHandler handler)
void error(String msg)
void p(final String message, long timestamp)
Vector getLogRecords()
Vector getLogRecorsdByComponentName(final String componentName)
Vector getLogRecorsdByTimeStamp(final long start, final long end)
void clearLogRecords()
int getLogNumber()
String getLogHeader()