com.funambol.util
Class RMSAppender

java.lang.Object
  extended by com.funambol.util.RMSAppender
All Implemented Interfaces:
Appender

public class RMSAppender
extends java.lang.Object
implements Appender

Logger class for debugging porposes


Field Summary
static int DEFAULTLOGFILESIZE
           
static java.lang.String LOGDBNAME
           
 
Constructor Summary
RMSAppender(java.lang.String logfilename)
           
RMSAppender(java.lang.String logFileName, int size)
           
 
Method Summary
 void closeLogFile()
          Closes DS-Log store and catch all possible exception
 void deleteLogFile()
          Resets DS-Log store and catch all possible exception
static int getDefaultLogFileSize()
          Getter method for defaultLogFileSize
static int getDefaultLogStoreSizeToBeFree()
          Getter method for defaultLogFileSizeToBeFree
static int getFirstRecord()
          Getter method for firstRecord
 LogContent getLogContent()
          Get the whole log content for this appender
 void initLogFile()
          Mandatory method for all applications that means to use DS-Log store method (non jsr-75 compliant applications)
 void openLogFile()
          Opens DS-Log store and catch all possible exception
static void setDefaultLogFileSize(int newDefaultLogFileSize)
          Setter method for defaultLogFileSize
static void setDefaultLogStoreSizeToBeFree(int newDefaultLogStoreSizeToBeFree)
          Setter method for defaultLogFileSize
 void setLogLevel(int newlevel)
          Perform additional actions needed when setting a new level.
 void writeLogMessage(java.lang.String level, java.lang.String msg)
          Logs a string to standard output and to the device's event logger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGDBNAME

public static final java.lang.String LOGDBNAME
See Also:
Constant Field Values

DEFAULTLOGFILESIZE

public static final int DEFAULTLOGFILESIZE
See Also:
Constant Field Values
Constructor Detail

RMSAppender

public RMSAppender(java.lang.String logfilename)

RMSAppender

public RMSAppender(java.lang.String logFileName,
                   int size)
Method Detail

writeLogMessage

public void writeLogMessage(java.lang.String level,
                            java.lang.String msg)
                     throws DataAccessException
Logs a string to standard output and to the device's event logger

Specified by:
writeLogMessage in interface Appender
Parameters:
msg - the string to be logged
Throws:
DataAccessException

openLogFile

public void openLogFile()
Opens DS-Log store and catch all possible exception

Specified by:
openLogFile in interface Appender

closeLogFile

public void closeLogFile()
Closes DS-Log store and catch all possible exception

Specified by:
closeLogFile in interface Appender

deleteLogFile

public void deleteLogFile()
Resets DS-Log store and catch all possible exception

Specified by:
deleteLogFile in interface Appender

initLogFile

public void initLogFile()
Mandatory method for all applications that means to use DS-Log store method (non jsr-75 compliant applications)

Specified by:
initLogFile in interface Appender

setLogLevel

public void setLogLevel(int newlevel)
Perform additional actions needed when setting a new level.

Specified by:
setLogLevel in interface Appender

setDefaultLogFileSize

public static void setDefaultLogFileSize(int newDefaultLogFileSize)
Setter method for defaultLogFileSize

Parameters:
newDefaultLogFileSize - is the new default log size in bytes

getDefaultLogFileSize

public static int getDefaultLogFileSize()
Getter method for defaultLogFileSize

Returns:
defaultLogFileSize default log size in bytes

setDefaultLogStoreSizeToBeFree

public static void setDefaultLogStoreSizeToBeFree(int newDefaultLogStoreSizeToBeFree)
Setter method for defaultLogFileSize

Parameters:
newDefaultLogStoreSizeToBeFree - is the new default log size to be free

getDefaultLogStoreSizeToBeFree

public static int getDefaultLogStoreSizeToBeFree()
Getter method for defaultLogFileSizeToBeFree

Returns:
defaultLogFileSize log size to be free in bytes

getFirstRecord

public static int getFirstRecord()
Getter method for firstRecord

Returns:
defaultLogFileSize log size to be free in bytes

getLogContent

public LogContent getLogContent()
                         throws java.io.IOException
Description copied from interface: Appender
Get the whole log content for this appender

Specified by:
getLogContent in interface Appender
Returns:
LogContent the LogContent object log Container
Throws:
java.io.IOException


Copyright © 2001-2009 Funambol.