TxLoggerpublic final class TxLogger extends Object This is a helper class that provides some convenience methods wrapped around the
standard {@link java.util.logging.Logger} interface.
Logging domains:
wstx // general for all web service transactions
wstx.wscoord // for ws-coordination logging
wstx.at // for ws-atomic transaction logging. |
Fields Summary |
---|
private static final String | LOGGING_SUBSYSTEM_NAMEIf we run with JAX-WS, we are using its logging domain (appended with ".wstx").
Otherwise we default to "wstx". | private final String | componentClassName | private final Logger | logger |
Constructors Summary |
---|
private TxLogger(String componentName)Prevents creation of a new instance of this TxLogger
this.componentClassName = "[" + componentName + "] ";
this.logger = java.util.logging.Logger.getLogger(LOGGING_SUBSYSTEM_NAME);
| private TxLogger(String componentName, String subsystem)
this.componentClassName = "[" + componentName + "] ";
this.logger = java.util.logging.Logger.getLogger(LOGGING_SUBSYSTEM_NAME + subsystem);
|
Methods Summary |
---|
public void | config(java.lang.String methodName, java.lang.String message)
logger.logp(Level.CONFIG, componentClassName, methodName, message);
| public void | config(java.lang.String methodName, java.lang.String message, java.lang.Throwable thrown)
logger.logp(Level.CONFIG, componentClassName, methodName, message, thrown);
| public void | entering(java.lang.String methodName)
logger.entering(componentClassName, methodName);
| public void | entering(java.lang.String methodName, java.lang.Object parameter)
logger.entering(componentClassName, methodName, parameter);
| public void | entering(java.lang.String methodName, java.lang.Object[] parameters)
logger.entering(componentClassName, methodName, parameters);
| public void | exiting(java.lang.String methodName)
logger.exiting(componentClassName, methodName);
| public void | exiting(java.lang.String methodName, java.lang.Object result)
logger.exiting(componentClassName, methodName, result);
| public void | fine(java.lang.String methodName, java.lang.String message)
logger.logp(Level.FINE, componentClassName, methodName, message);
| public void | fine(java.lang.String methodName, java.lang.String message, java.lang.Throwable thrown)
logger.logp(Level.FINE, componentClassName, methodName, message, thrown);
| public void | finer(java.lang.String methodName, java.lang.String message)
logger.logp(Level.FINER, componentClassName, methodName, message);
| public void | finer(java.lang.String methodName, java.lang.String message, java.lang.Throwable thrown)
logger.logp(Level.FINER, componentClassName, methodName, message, thrown);
| public void | finest(java.lang.String methodName, java.lang.String message)
logger.logp(Level.FINEST, componentClassName, methodName, message);
| public void | finest(java.lang.String methodName, java.lang.String message, java.lang.Throwable thrown)
logger.logp(Level.FINEST, componentClassName, methodName, message, thrown);
| public static com.sun.xml.ws.tx.common.TxLogger | getATLogger(java.lang.Class componentClass)Logging specifically for *.wstx.wsat subsystem.
return new TxLogger(componentClass.getName(), ".wsat");
| public static com.sun.xml.ws.tx.common.TxLogger | getCoordLogger(java.lang.Class componentClass)Logging specifically for *.wstx.wscoord subsystem.
return new TxLogger(componentClass.getName(), ".wscoord");
| public static com.sun.xml.ws.tx.common.TxLogger | getLogger(java.lang.Class componentClass)The factory method returns preconfigured TxLogger wrapper for the class. Since there is no caching implemented,
it is advised that the method is called only once per a class in order to initialize a final static logger variable,
which is then used through the class to perform actual logging tasks.
return new TxLogger(componentClass.getName());
| public void | info(java.lang.String methodName, java.lang.String message)
logger.logp(Level.INFO, componentClassName, methodName, message);
| public void | info(java.lang.String methodName, java.lang.String message, java.lang.Throwable thrown)
logger.logp(Level.INFO, componentClassName, methodName, message, thrown);
| public boolean | isLogging(java.util.logging.Level level)
return logger.isLoggable(level);
| public void | log(java.util.logging.Level level, java.lang.String methodName, java.lang.String message)
logger.logp(level, componentClassName, methodName, message);
| public void | log(java.util.logging.Level level, java.lang.String methodName, java.lang.String message, java.lang.Throwable thrown)
logger.logp(level, componentClassName, methodName, message, thrown);
| public void | severe(java.lang.String methodName, java.lang.String message)
logger.logp(Level.SEVERE, componentClassName, methodName, message);
| public void | severe(java.lang.String methodName, java.lang.String message, java.lang.Throwable thrown)
logger.logp(Level.SEVERE, componentClassName, methodName, message, thrown);
| public void | warning(java.lang.String methodName, java.lang.String message)
logger.logp(Level.WARNING, componentClassName, methodName, message);
| public void | warning(java.lang.String methodName, java.lang.String message, java.lang.Throwable thrown)
logger.logp(Level.WARNING, componentClassName, methodName, message, thrown);
|
|