com.funambol.util
Class Log

java.lang.Object
  extended by com.funambol.util.Log

public class Log
extends java.lang.Object

Generic Log class


Field Summary
static int DEBUG
          Log level DEBUG: used to log debug messages.
static int DISABLED
          Log level DISABLED: used to speed up applications using logging features
static int ERROR
          Log level ERROR: used to log error messages.
static int INFO
          Log level INFO: used to log information messages.
static java.util.Vector probes
          Probes for performances tracking
static int TRACE
          Log level TRACE: used to trace the program execution.
 
Method Summary
static void addProbe(java.lang.String msg)
           
static void debug(java.lang.Object obj, java.lang.String msg)
          DEBUG: Information message
static void debug(java.lang.String msg)
          DEBUG: Debug message
static void deleteLog()
          Delete log file
static void error(java.lang.Object obj, java.lang.String msg)
          ERROR: Error message
static void error(java.lang.String msg)
          ERROR: Error message
static int getLogLevel()
          Accessor method to retrieve log level:
static void info(java.lang.Object obj, java.lang.String msg)
          INFO: Information message
static void info(java.lang.String msg)
          INFO: Information message
static void initLog(Appender object)
          Ititialize log file
static void initLog(Appender object, int level)
          Initialize log file with a specific log level.
static void setLogLevel(int newlevel)
          Accessor method to define log level:
static void trace(java.lang.Object obj, java.lang.String msg)
          TRACE: Information message
static void trace(java.lang.String msg)
          TRACE: Debugger mode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISABLED

public static final int DISABLED
Log level DISABLED: used to speed up applications using logging features

See Also:
Constant Field Values

ERROR

public static final int ERROR
Log level ERROR: used to log error messages.

See Also:
Constant Field Values

INFO

public static final int INFO
Log level INFO: used to log information messages.

See Also:
Constant Field Values

DEBUG

public static final int DEBUG
Log level DEBUG: used to log debug messages.

See Also:
Constant Field Values

TRACE

public static final int TRACE
Log level TRACE: used to trace the program execution.

See Also:
Constant Field Values

probes

public static java.util.Vector probes
Probes for performances tracking

Method Detail

initLog

public static void initLog(Appender object,
                           int level)
Initialize log file with a specific log level. With this implementation of initLog the initialization is skipped. Only a delete of log is performed.

Parameters:
object - the appender object that write log file
level - the log level

initLog

public static void initLog(Appender object)
Ititialize log file

Parameters:
object - the appender object that write log file

deleteLog

public static void deleteLog()
Delete log file


setLogLevel

public static void setLogLevel(int newlevel)
Accessor method to define log level:

Parameters:
newlevel - log level to be set

getLogLevel

public static int getLogLevel()
Accessor method to retrieve log level:

Returns:
actual log level

addProbe

public static void addProbe(java.lang.String msg)

error

public static void error(java.lang.String msg)
ERROR: Error message

Parameters:
msg - the message to be logged

error

public static void error(java.lang.Object obj,
                         java.lang.String msg)
ERROR: Error message

Parameters:
msg - the message to be logged
obj - the object that send error message

info

public static void info(java.lang.String msg)
INFO: Information message

Parameters:
msg - the message to be logged

info

public static void info(java.lang.Object obj,
                        java.lang.String msg)
INFO: Information message

Parameters:
msg - the message to be logged
obj - the object that send log message

debug

public static void debug(java.lang.String msg)
DEBUG: Debug message

Parameters:
msg - the message to be logged

debug

public static void debug(java.lang.Object obj,
                         java.lang.String msg)
DEBUG: Information message

Parameters:
msg - the message to be logged
obj - the object that send log message

trace

public static void trace(java.lang.String msg)
TRACE: Debugger mode


trace

public static void trace(java.lang.Object obj,
                         java.lang.String msg)
TRACE: Information message

Parameters:
msg - the message to be logged
obj - the object that send log message


Copyright © 2006 Funambol.