|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.logging.ErrorManager
cox.jmatt.java.MathTools.util.CCLogErrorManager
public class CCLogErrorManager
This class is designed to complement CCLogHandler
. It sends any logging errors to CapCom.error()
. It is also worth noting that
this class is NOT necessary for the CapCom Handler
class; log system error management is built in! Rather, this class exists to allow error
management for non-MathTools Handler
subclasses.
By the first error is logged and the rest are ignored, per its superclass. This behavior can be overridden to log all errors. This is accomplished via
constructor or the setLogAlways()
method.
It is important to note that this class is used to report error conditions that happen as a result of logging an application error. The original error that caused the log request to be generated is NOT reported here, only any errors that occur as a result of the logging call. Six failure codes are represented. They are: 'Generic,' 'Write,' 'Flush,' 'Close,' 'Open' and 'Format.' If the integer fail code does not correspond to one of these the fail code is 'Unknown.' If an Exception is generated it is also printed.
Field Summary |
---|
Fields inherited from class java.util.logging.ErrorManager |
---|
CLOSE_FAILURE, FLUSH_FAILURE, FORMAT_FAILURE, GENERIC_FAILURE, OPEN_FAILURE, WRITE_FAILURE |
Constructor Summary | |
---|---|
CCLogErrorManager()
Standard constructor. |
|
CCLogErrorManager(boolean pPrintAlways)
Constructor used to change the 'always print' status to true or explicitly leave it disabled. |
Method Summary | |
---|---|
void |
error(java.lang.String pMesg,
java.lang.Exception pErr,
int pCode)
This method is called when the logging system generates an error. |
void |
setLogAlways(boolean pEnable)
Use this method to enable/disable default behavior. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CCLogErrorManager()
public CCLogErrorManager(boolean pPrintAlways)
Method Detail |
---|
public void error(java.lang.String pMesg, java.lang.Exception pErr, int pCode)
This method is called when the logging system generates an error. If no Global Printer is set it returns immediately. If default behavior is in effect the second and subsequent errors are silently ignored. If 'print all' is enabled then all such errors will be printed.
The error code is printed if recognized, otherwise the value is 'Unknown'.
error
in class java.util.logging.ErrorManager
public void setLogAlways(boolean pEnable)
Use this method to enable/disable default behavior. By default only the first error message is printed. Call this method with 'true' to print ALL error messages.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |