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
-
CRITICAL
- Corresponds to highly irrecuperable malfunction.
-
ERROR
- Corresponds to serious malfunction.
-
INFO
- Corresponds to progress report messages.
-
TRACE
- Corresponds to debugging messages.
-
WARNING
- Corresponds to situations of minor malfunction or misconfiguration.
-
Log()
-
-
critical(String, String)
- Shorthand form of log(.., Log.CRITICAL, ..)
Strictly equivalent to the log() with the level parameter set to
Log.CRITICAL.
-
error(String, String)
- Shorthand form of log(.., Log.ERROR, ..)
Strictly equivalent to the log() with the level parameter set to
Log.ERROR.
-
info(String, String)
- Shorthand form of log(.., Log.INFO, ..)
Strictly equivalent to the log() with the level parameter set to
Log.INFO.
-
init()
- Initialise the Logging facility in conjunction with the
preference manager.
-
init(String)
- A stub for the setFullFileName method.
-
log(Object, int, String)
- Alternate log() form.
-
log(String, int, String)
- Log a message.
-
setCategory(String, int)
- Configure logging categories.
-
setCategoryPrefixing(boolean)
- Set whether category printing is enabled or not.
-
setDatePrinting(boolean)
- Set whether date printing is enabled or not.
-
setDefaultCategoryLevel(int)
- Sets up the default category level of logging.
-
setFullFileName(String)
- Set the log file to use.
-
setStackInfoThreshold(int)
- Set the stack information threshold.
-
setTimePrinting(boolean)
- Set whether time printing is enabled or not.
-
trace(String, String)
- Shorthand form of log(.., Log.TRACE, ..)
Strictly equivalent to the log() with the level parameter set to
Log.TRACE.
-
warning(String, String)
- Shorthand form of log(.., Log.WARNING, ..)
Strictly equivalent to the log() with the level parameter set to
Log.WARNING.
CRITICAL
public final static int CRITICAL
- Corresponds to highly irrecuperable malfunction.
CRITICAL level errors should be used for extremely serious error
conditions.
ERROR
public final static int ERROR
- Corresponds to serious malfunction.
ERROR level errors should be used for highly serious error
conditions.
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.
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.
TRACE
public final static int TRACE
- Corresponds to debugging messages.
TRACE level is intended for use in isolating programming erros.
Log
public Log()
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.
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.
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
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
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
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
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
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
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
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.
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
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.
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.
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.
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.
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