|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
AbleLogger is an interface used for recording messages and tracing programs. It wrappers functions from the com.ibm.logging package to minimize the dependancy. It defines custome trace and log levels used by ABLE. Tacitly assumed is that each logger will include a console handler and a file handler to process log records.
Logger
Field Summary | |
---|---|
static long |
MSG_ERROR
|
static long |
MSG_INFO
|
static long |
MSG_NONE
|
static long |
MSG_UNSPECIFIED
|
static long |
MSG_WARNING
|
static long |
serialVersionUID
|
static long |
TRC_HIGH
|
static long |
TRC_HIGH_INFER
|
static long |
TRC_HIGH_PARSE
|
static long |
TRC_HIGH_RLST
|
static long |
TRC_LOW
|
static long |
TRC_LOW_INFER
|
static long |
TRC_LOW_PARSE
|
static long |
TRC_LOW_RLST
|
static long |
TRC_MEDIUM
|
static long |
TRC_MEDIUM_INFER
|
static long |
TRC_MEDIUM_PARSE
|
static long |
TRC_MEDIUM_RLST
|
static long |
TRC_NONE
|
Fields inherited from interface com.ibm.logging.IRecordType |
---|
TYPE_ALL, TYPE_API, TYPE_CALLBACK, TYPE_DEBUG_MAX, TYPE_DEBUG_MID, TYPE_DEBUG_MIN, TYPE_DEFAULT_MESSAGE, TYPE_DEFAULT_TRACE, TYPE_ENTRY, TYPE_ENTRY_EXIT, TYPE_ERR, TYPE_ERROR, TYPE_ERROR_EXC, TYPE_EXIT, TYPE_FATAL, TYPE_INFO, TYPE_INFORMATION, TYPE_LEVEL1, TYPE_LEVEL2, TYPE_LEVEL3, TYPE_MISC_DATA, TYPE_NONE, TYPE_OBJ_CREATE, TYPE_OBJ_DELETE, TYPE_PERF, TYPE_PRIVATE, TYPE_PUBLIC, TYPE_STATIC, TYPE_SVC, TYPE_WARN, TYPE_WARNING |
Method Summary | |
---|---|
void |
addHandler(java.lang.Object handler,
long level)
Add a handler to this logger. |
void |
entry(long type,
java.lang.Object loggingClass,
java.lang.String loggingMethod)
Log a method entry trace statement without parameters. |
void |
entry(long type,
java.lang.Object loggingClass,
java.lang.String loggingMethod,
java.lang.Object parm)
Log a method entry trace statement with one parameter. |
void |
entry(long type,
java.lang.Object loggingClass,
java.lang.String loggingMethod,
java.lang.Object[] parms)
Log a method entry trace statement with multiple parameters. |
void |
exception(long type,
java.lang.Object loggingClass,
java.lang.String loggingMethod,
java.lang.Throwable throwable)
Log an exception. |
void |
exit(long type,
java.lang.Object loggingClass,
java.lang.String loggingMethod)
Log a method exit trace statement with no result. |
void |
exit(long type,
java.lang.Object loggingClass,
java.lang.String loggingMethod,
java.lang.Object result)
Log a method exit trace statement with a result. |
long |
getConsoleLogLevel()
Returns the raw value used to calculate the console handler filter. |
java.lang.String |
getFileLogFileName()
Returns the name of the file written to by the file handler. |
long |
getFileLogLevel()
Returns the raw value used to calculate the file handler filter. |
java.util.Enumeration |
getHandlers()
Returns an Enumeration of handlers from this logger. |
boolean |
isBeanLogger()
Indicates true if a bean has its own unique logger instance, or false to indicate it is using the static Able.TraceLog logger. |
boolean |
isLogging()
Indicates if statements are being logged. |
boolean |
isTraceLogger()
Indicates if the logger is configured for trace output. |
void |
message(long type,
java.lang.Object loggingClass,
java.lang.String loggingMethod,
java.lang.String key)
Log a translated message. |
void |
message(long type,
java.lang.Object loggingClass,
java.lang.String loggingMethod,
java.lang.String key,
java.lang.Object[] parms)
Log a translated message with multiple substitution parameters. |
void |
message(long type,
java.lang.Object loggingClass,
java.lang.String loggingMethod,
java.lang.String key,
java.lang.String parm)
Log a translated message with a single substitution parameter. |
void |
removeHandler(java.lang.Object handler)
Remove a handler from this logger. |
void |
setConsoleLogLevel(long level)
Sets the raw value used for the console handler filter. |
void |
setFileLogLevel(long level)
Sets the raw value used to set the file handler filter. |
void |
setLogging(boolean isLogging)
Sets logging on if true. |
void |
stackTrace(long type,
java.lang.Object loggingClass,
java.lang.String loggingMethod)
Log a stacktrace. |
void |
text(long type,
java.lang.Object loggingClass,
java.lang.String loggingMethod,
java.lang.String text)
Log an untranslated trace statement. |
void |
text(long type,
java.lang.Object loggingClass,
java.lang.String loggingMethod,
java.lang.String text,
java.lang.Object[] parms)
Log an untranslated trace statement with substitution parameters. |
void |
text(long type,
java.lang.String text)
Log an untranslated trace statement. |
Field Detail |
public static final long serialVersionUID
public static final long TRC_LOW
Able.TRC_LOW
public static final long TRC_MEDIUM
Able.TRC_MEDIUM
public static final long TRC_HIGH
Able.TRC_HIGH
public static final long TRC_NONE
Able.TRC_NONE
public static final long TRC_LOW_RLST
Able.TRC_LOW_RLST
public static final long TRC_MEDIUM_RLST
Able.TRC_MEDIUM_RLST
public static final long TRC_HIGH_RLST
Able.TRC_HIGH_RLST
public static final long TRC_LOW_PARSE
Able.TRC_LOW_PARSE
public static final long TRC_MEDIUM_PARSE
Able.TRC_MEDIUM_PARSE
public static final long TRC_HIGH_PARSE
Able.TRC_HIGH_PARSE
public static final long TRC_LOW_INFER
Able.TRC_LOW_INFER
public static final long TRC_MEDIUM_INFER
Able.TRC_MEDIUM_INFER
public static final long TRC_HIGH_INFER
Able.TRC_HIGH_INFER
public static final long MSG_INFO
Able.MSG_INFO
public static final long MSG_WARNING
Able.MSG_WARNING
public static final long MSG_ERROR
Able.MSG_ERROR
public static final long MSG_NONE
Able.MSG_NONE
public static final long MSG_UNSPECIFIED
Able.MSG_UNSPECIFIED
Method Detail |
public void message(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.String key)
type
- A message record type, typically one of those with a prefix of MSG_.loggingClass
- An instance of a class (this), or a String
containing the package and name if static.loggingMethod
- A string containing the name of the method.key
- The key used to obtain the translated
message from the resource bundle.Logger.message(long,Object,String,String)
public void message(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.String key, java.lang.String parm)
type
- A message record type, typically one of those with a prefix of MSG_.loggingClass
- An instance of a class (this), or a String
containing the package and name if static.loggingMethod
- A string containing the name of the method.key
- The key used to obtain the translated
message from the resource bundle.parm
- A substitution value to be inserted into the message.Logger.message(long,Object,String,String,Object[])
public void message(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.String key, java.lang.Object[] parms)
type
- A message record type, typically one of those with a prefix of MSG_.loggingClass
- An instance of a class (this), or a String
containing the package and name if static.loggingMethod
- A string containing the name of the method.key
- The key used to obtain the translated
message from the resource bundle.parms
- A array of substitution values to be inserted into the message.Logger.message(long,Object,String,String,Object[])
public void text(long type, java.lang.String text)
type
- A trace record type, typically one of those with a prefix of TRC_.text
- The text to be logged.public void text(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.String text)
type
- A trace record type, typically one of those with a prefix of TRC_.loggingClass
- An instance of a class (this), or a String
containing the package and name if static.loggingMethod
- A string containing the name of the method.text
- The text to be logged.Logger.text(long,Object,String,String)
public void text(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.String text, java.lang.Object[] parms)
type
- A trace record type, typically one of those with a prefix of TRC_.loggingClass
- An instance of a class (this), or a String
containing the package and name if static.loggingMethod
- A string containing the name of the method.text
- The text to be logged.parms
- The array of substitution values to be inserted into the text.Logger.text(long,Object,String,String,Object[])
public void entry(long type, java.lang.Object loggingClass, java.lang.String loggingMethod)
type
- A trace record type, typically one of those with a prefix of TRC_.loggingClass
- An instance of a class (this), or a String
containing the package and name if static.loggingMethod
- A string containing the name of the method.Logger.entry(long,Object,String)
public void entry(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.Object parm)
type
- A trace record type, typically one of those with a prefix of TRC_.loggingClass
- An instance of a class (this), or a String
containing the package and name if static.loggingMethod
- A string containing the name of the method.parm
- The object provided in the method's argument list.Logger.entry(long,Object,String,Object)
public void entry(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.Object[] parms)
type
- A trace record type, typically one of those with a prefix of TRC_.loggingClass
- An instance of a class (this), or a String
containing the package and name if static.loggingMethod
- A string containing the name of the method.parms
- The objects provided in the method's argument list.Logger.entry(long,Object,String,Object[])
public void exception(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.Throwable throwable)
type
- A trace record type, typically one of those with a prefix of TRC_.loggingClass
- An instance of a class (this), or a String
containing the package and name if static.loggingMethod
- A string containing the name of the method.throwable
- The exception.Logger.exception(long,Object,String,Throwable)
public void exit(long type, java.lang.Object loggingClass, java.lang.String loggingMethod)
type
- A trace record type, typically one of those with a prefix of TRC_.loggingClass
- An instance of a class (this), or a String
containing the package and name if static.loggingMethod
- A string containing the name of the method.Logger.exit(long,Object,String)
public void exit(long type, java.lang.Object loggingClass, java.lang.String loggingMethod, java.lang.Object result)
type
- A trace record type, typically one of those with a prefix of TRC_.loggingClass
- An instance of a class (this), or a String
containing the package and name if static.loggingMethod
- A string containing the name of the method.result
- The result of the method.Logger.exit(long,Object,String,Object)
public boolean isLogging()
public void setLogging(boolean isLogging)
isLogging
- Turns logging on if true, off otherwise.public boolean isBeanLogger()
Able.TraceLog
logger.public boolean isTraceLogger()
public void stackTrace(long type, java.lang.Object loggingClass, java.lang.String loggingMethod)
type
- A trace record type, typically one of those with a prefix of TRC_.loggingClass
- An instance of a class (this), or a String
containing the package and name if static.loggingMethod
- A string containing the name of the method.Logger.stackTrace(long,Object,String)
public void addHandler(java.lang.Object handler, long level)
theHandler
- The handler to add.LoggerCfg.addHandler(IHandler)
public void removeHandler(java.lang.Object handler)
theHandler
- The handler to remove.LoggerCfg.removeHandler(IHandler)
public java.util.Enumeration getHandlers()
LoggerCfg.getHandlers()
public long getConsoleLogLevel()
AbleTraceLogger.MessageLogSeverityValuesVector
;
trace logger values will be one of
AbleTraceLogger.TraceLogLevelValuesVector
.public void setConsoleLogLevel(long level)
AbleTraceLogger.MessageLogSeverityValuesVector
;
trace logger values will be one of
AbleTraceLogger.TraceLogLevelValuesVector
.public long getFileLogLevel()
AbleTraceLogger.MessageLogSeverityValuesVector
;
trace loggers values will be one of
AbleTraceLogger.TraceLogLevelValuesVector
.public void setFileLogLevel(long level)
AbleTraceLogger.MessageLogSeverityValuesVector
;
trace loggers values will be one of
AbleTraceLogger.TraceLogLevelValuesVector
.public java.lang.String getFileLogFileName()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |