use of org.jpos.util.LogListener in project jPOS by jpos.
the class LoggerAdaptor method addListener.
private void addListener(Element e) throws ConfigurationException {
QFactory factory = getServer().getFactory();
String clazz = e.getAttributeValue("class");
LogListener listener = (LogListener) factory.newInstance(clazz);
if (listener instanceof Configurable) {
try {
((Configurable) listener).setConfiguration(factory.getConfiguration(e));
} catch (ConfigurationException ex) {
throw new ConfigurationException(ex);
}
}
logger.addListener(listener);
}
Aggregations