Class semper.util.log.Log
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.util.log.Log

java.lang.Object
   |
   +----semper.util.log.Log

public class Log
extends Object
SEMPER Log class
Version:
$Revision: 1.15 $ $Date: 1996/09/03 17:15:45 $
Author:
Gulcu Ceki ([email protected]), Jose-Luis Abad-Peiro ([email protected])
See Also:
SemperBuyer, SemperSeller

Variable Index

 o CRITICAL
Corresponds to highly irrecuperable malfunction.
 o ERROR
Corresponds to serious malfunction.
 o INFO
Corresponds to progress report messages.
 o TRACE
Corresponds to debugging messages.
 o WARNING
Corresponds to situations of minor malfunction or misconfiguration.

Constructor Index

 o Log()

Method Index

 o critical(String, String)
Shorthand form of log(.., Log.CRITICAL, ..)

Strictly equivalent to the log() with the level parameter set to Log.CRITICAL.

 o error(String, String)
Shorthand form of log(.., Log.ERROR, ..)

Strictly equivalent to the log() with the level parameter set to Log.ERROR.

 o info(String, String)
Shorthand form of log(.., Log.INFO, ..)

Strictly equivalent to the log() with the level parameter set to Log.INFO.

 o init()
Initialise the Logging facility in conjunction with the preference manager.
 o init(String)
A stub for the setFullFileName method.
 o log(Object, int, String)
Alternate log() form.
 o log(String, int, String)
Log a message.
 o setCategory(String, int)
Configure logging categories.
 o setCategoryPrefixing(boolean)
Set whether category printing is enabled or not.
 o setDatePrinting(boolean)
Set whether date printing is enabled or not.
 o setDefaultCategoryLevel(int)
Sets up the default category level of logging.
 o setFullFileName(String)
Set the log file to use.
 o setStackInfoThreshold(int)
Set the stack information threshold.
 o setTimePrinting(boolean)
Set whether time printing is enabled or not.
 o trace(String, String)
Shorthand form of log(.., Log.TRACE, ..)

Strictly equivalent to the log() with the level parameter set to Log.TRACE.

 o warning(String, String)
Shorthand form of log(.., Log.WARNING, ..)

Strictly equivalent to the log() with the level parameter set to Log.WARNING.

Variables

 o CRITICAL
  public final static int CRITICAL
Corresponds to highly irrecuperable malfunction. CRITICAL level errors should be used for extremely serious error conditions.
 o ERROR
  public final static int ERROR
Corresponds to serious malfunction. ERROR level errors should be used for highly serious error conditions.
 o WARNING
  public final static int WARNING
Corresponds to situations of minor malfunction or misconfiguration. WARNING level messages should be used for situations reflecting misconfigurations or probable programming errors.
 o INFO
  public final static int INFO
Corresponds to progress report messages. INFO level is intended for high level messages, e.g. for reporting to the user/programmer on the progress of a particular run.
 o TRACE
  public final static int TRACE
Corresponds to debugging messages. TRACE level is intended for use in isolating programming erros.

Constructors

 o Log
  public Log()

Methods

 o init
  public static synchronized void init()
Initialise the Logging facility in conjunction with the preference manager. Unimplemented at this time. Please use the relevant setX() methods instead.
 o init
  public static synchronized void init(String s)
A stub for the setFullFileName method. Intended for compatibility with existing code. This form will be phased out.
 o log
  public static synchronized void log(String categoryList,
                                      int level,
                                      String message)
Log a message.

This method may send a the message to the file specified by the preference manager depending on the space separated categoryList and level parameters. Each element of the list corresponds to a specific category to which the log message belongs.

Depending on configuration options, additional information such as, stack trace , current time, date, standard prefix may also recorded.

Parameters:
categoryList - space separated list of categories to which this message pertains.
level - level of debugging; one of CRITICAL, ERROR, WARNING, INFO and TRACE.
message - string to write in the log file
 o log
  public static void log(Object object,
                         int level,
                         String message)
Alternate log() form.

Similar to the previous log() method except that the category is derived from the class name of the object.

This form is retained for compatibility and should be phased out.

Parameters:
object - category is the class name of this object
message - string to write in the default log file
 o critical
  public static synchronized void critical(String categoryList,
                                           String message)
Shorthand form of log(.., Log.CRITICAL, ..)

Strictly equivalent to the log() with the level parameter set to Log.CRITICAL.

Parameters:
categoryList - space separated list of categories to which this message pertains.
message - string to write in the log file
 o error
  public static synchronized void error(String categoryList,
                                        String message)
Shorthand form of log(.., Log.ERROR, ..)

Strictly equivalent to the log() with the level parameter set to Log.ERROR.

Parameters:
categoryList - space separated list of categories to which this message pertains.
message - string to write in the log file
 o warning
  public static synchronized void warning(String categoryList,
                                          String message)
Shorthand form of log(.., Log.WARNING, ..)

Strictly equivalent to the log() with the level parameter set to Log.WARNING.

Parameters:
categoryList - space separated list of categories to which this message pertains.
message - string to write in the log file
 o info
  public static synchronized void info(String categoryList,
                                       String message)
Shorthand form of log(.., Log.INFO, ..)

Strictly equivalent to the log() with the level parameter set to Log.INFO.

Parameters:
category - space separated list of categories to which this message pertains.
message - string to write in the log file
 o trace
  public static void trace(String categoryList,
                           String message)
Shorthand form of log(.., Log.TRACE, ..)

Strictly equivalent to the log() with the level parameter set to Log.TRACE.

Parameters:
category - space separated list of categories to which this message pertains.
message - string to write in the log file
Throws: IOException
throws IOException
 o setFullFileName
  public static String setFullFileName(String fullFileName)
Set the log file to use.
Parameters:
fullFileName - The full file name for the log file.
Returns:
String Previously used log file.
 o setDefaultCategoryLevel
  public static int setDefaultCategoryLevel(int level)
Sets up the default category level of logging.

Possible values (in decreasing priority) are CRITICAL, ERROR, WARNING, INFO and TRACE. Default value is INFO.

When a message does not belong to any known category it is assigned the default category level.

Parameters:
New - default
Returns:
The old default
 o setCategory
  public static void setCategory(String category,
                                 int value)
Configure logging categories.
Parameters:
category - The category to configure
value - The value of the category. Possible values are (in increasing severity ) are CRITICAL, ERROR, WARNING, INFO and TRACE.
 o setStackInfoThreshold
  public static int setStackInfoThreshold(int level)
Set the stack information threshold.

Possible values (in decreasing priority) are CRITICAL, ERROR, WARNING, INFO and TRACE. Default value is WARNING.

Stack tracing information is added for all messages of same or higher prority than the stack information threshold.

Parameters:
The - new stack info threshold.
Returns:
The old stack info threshold.
 o setDatePrinting
  public static boolean setDatePrinting(boolean newValue)
Set whether date printing is enabled or not. If date printing is enabled, then date information is added to all logged messages.
Parameters:
newValue - New date printing setting.
Returns:
boolean The old date printing setting.
 o setTimePrinting
  public static boolean setTimePrinting(boolean newValue)
Set whether time printing is enabled or not. If time printing is enabled, then time information is added to all logged messages.
Parameters:
newValue - New time printing setting.
Returns:
boolean The old time printing setting.
 o setCategoryPrefixing
  public static boolean setCategoryPrefixing(boolean newValue)
Set whether category printing is enabled or not. If time category printing is enabled, then the first category in the categoryList (see log()) is added to all messages.
Parameters:
newValue - New category printing setting.
Returns:
boolean The old category printing setting.

All Packages  Class Hierarchy  This Package  Previous  Next  Index