|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.j2ca.extension.logging.LogUtils
LogUtils - Provides uniform access to the log/trace/monitoring/FFDC services. It needs a WBIResourceAdapter bean for initialization.
Constructor Summary | |
---|---|
LogUtils(java.util.logging.Logger logger,
java.lang.String packName,
java.lang.String productName,
java.lang.String productVersion)
Constructs a LogUtils |
|
LogUtils(WBIResourceAdapter ra)
Constructs a LogUtils using the properties of the Resource Adapter. |
|
LogUtils(WBIResourceAdapter ra,
boolean isManaged)
Constructs a LogUtils using the properties of the Resource Adapter |
Method Summary | |
---|---|
void |
close()
Remove the file handlers from the Logger and close the them. |
java.util.logging.Logger |
getLogger()
|
boolean |
isLogEnabled(java.util.logging.Level logLevel)
Checks if this log level is enabled |
boolean |
isTraceEnabled(java.util.logging.Level traceLevel)
Checks if this trace level is enabled |
void |
log(java.util.logging.Level l,
int bundleType,
java.lang.String classname,
java.lang.String method,
java.lang.String msgKey)
Generates a message and send it to the log destinations |
void |
log(java.util.logging.Level l,
int bundleType,
java.lang.String classname,
java.lang.String method,
java.lang.String msgKey,
com.ibm.j2ca.extension.logging.cbe.CBEEngineData engine)
Generates a message and send it to the log destinations |
void |
log(java.util.logging.Level l,
int bundleType,
java.lang.String classname,
java.lang.String method,
java.lang.String msgKey,
java.lang.Object[] params)
Generates a message and send it to the log destinations |
void |
log(java.util.logging.Level l,
int bundleType,
java.lang.String classname,
java.lang.String method,
java.lang.String msgKey,
java.lang.Object[] params,
com.ibm.j2ca.extension.logging.cbe.CBEEngineData engineData)
Generates a message and send it to the log destinations |
void |
setLogger(java.util.logging.Logger logger)
|
void |
setLoggingLevel(java.util.logging.Level level)
Set the level in the logging logger. |
void |
setMonitoringLevel(java.util.logging.Level level)
Set the level in the monitoring logger. |
void |
trace(java.util.logging.Level l,
java.lang.String classname,
java.lang.String method,
java.lang.String msg)
Generates a message and send it to the trace destinations |
void |
trace(java.util.logging.Level l,
java.lang.String classname,
java.lang.String method,
java.lang.String msg,
java.lang.Exception e)
Generates a message and send it to the trace destinations |
void |
traceDataObject(commonj.sdo.DataObject busObj,
java.lang.String classname,
java.lang.String method)
Dumps the data object contents using the AdaptarBOUtil's serializeDataObject method. |
void |
traceMethodEntrance(java.lang.String classname,
java.lang.String methodSignature)
Utility method to generate a trace message immediately after entering a method. |
void |
traceMethodExit(java.lang.String classname,
java.lang.String methodSignature)
Utility method to generate a trace message immediately before exiting a method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LogUtils(WBIResourceAdapter ra, boolean isManaged) throws javax.resource.spi.ResourceAdapterInternalException
ra
- the ResourceAdapter for this LogUtilspublic LogUtils(WBIResourceAdapter ra) throws javax.resource.spi.ResourceAdapterInternalException
ra
- the ResourceAdapter for this LogUtilspublic LogUtils(java.util.logging.Logger logger, java.lang.String packName, java.lang.String productName, java.lang.String productVersion) throws javax.resource.spi.ResourceAdapterInternalException
logger
- the logger for this LogUtilspackName
- the package name where to the LogMessages fileproductName
- the name of the product for this LogUtilsproductVersion
- the version of the product for this LogUtilsMethod Detail |
public boolean isTraceEnabled(java.util.logging.Level traceLevel)
traceLevel
-
public boolean isLogEnabled(java.util.logging.Level logLevel)
logLevel
-
public void trace(java.util.logging.Level l, java.lang.String classname, java.lang.String method, java.lang.String msg)
l
- the level for the trace messageclassname
- the name of the classmethod
- the name of the methodmsg
- the messagepublic void trace(java.util.logging.Level l, java.lang.String classname, java.lang.String method, java.lang.String msg, java.lang.Exception e)
l
- the level for the trace messageclassname
- the name of the classmethod
- the name of the methodmsg
- the messagee
- the exception to tracepublic void traceDataObject(commonj.sdo.DataObject busObj, java.lang.String classname, java.lang.String method)
public void log(java.util.logging.Level l, int bundleType, java.lang.String classname, java.lang.String method, java.lang.String msgKey, com.ibm.j2ca.extension.logging.cbe.CBEEngineData engine)
l
- the level for the log messagebundleType
- the bundle type, valid values are LogUtilConstants.ADAPTER_RBUNDLE and LogUtilConstants.BASE_RBUNDLEclassname
- the name of the classmethod
- the name of the methodmsgKey
- the key of the message in the ResourceBundlepublic void log(java.util.logging.Level l, int bundleType, java.lang.String classname, java.lang.String method, java.lang.String msgKey)
l
- the level for the log messagebundleType
- the bundle type, valid values are LogUtilConstants.ADAPTER_RBUNDLE and LogUtilConstants.BASE_RBUNDLEclassname
- the name of the classmethod
- the name of the methodmsgKey
- the key of the message in the ResourceBundlepublic void log(java.util.logging.Level l, int bundleType, java.lang.String classname, java.lang.String method, java.lang.String msgKey, java.lang.Object[] params, com.ibm.j2ca.extension.logging.cbe.CBEEngineData engineData)
l
- the level for the log messagebundleType
- the bundle type, valid values are LogUtilConstants.ADAPTER_RBUNDLE and LogUtilConstants.BASE_RBUNDLEclassname
- the name of the classmethod
- the name of the methodmsgKey
- the key of the message in the ResourceBundleparams
- the parameters to format the messageengineData
- store the event type datapublic void log(java.util.logging.Level l, int bundleType, java.lang.String classname, java.lang.String method, java.lang.String msgKey, java.lang.Object[] params)
l
- the level for the log messagebundleType
- the bundle type, valid values are LogUtilConstants.ADAPTER_RBUNDLE and LogUtilConstants.BASE_RBUNDLEclassname
- the name of the classmethod
- the name of the methodmsgKey
- the key of the message in the ResourceBundleparams
- the parameters to format the messagepublic void setLoggingLevel(java.util.logging.Level level)
level
- the new levelpublic void setMonitoringLevel(java.util.logging.Level level)
level
- the new levelpublic void close()
public void traceMethodEntrance(java.lang.String classname, java.lang.String methodSignature)
classname
- parent class of methodmethodSignature
- method name and optionally parameter types to uniquely
identify the method. For example, "doSomething" or
"doSomething(String,int)" if method doSomething
is overloaded.public void traceMethodExit(java.lang.String classname, java.lang.String methodSignature)
classname
- parent class of methodmethodSignature
- method name and optionally parameter types to uniquely
identify the method. For example, "doSomething" or
"doSomething(String,int)" if method doSomething
is overloaded.public java.util.logging.Logger getLogger()
public void setLogger(java.util.logging.Logger logger)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |