use of org.jpos.util.Logger in project jPOS by jpos.
the class SimpleKeyFileTest method testGetLogger.
@Test
public void testGetLogger() throws Throwable {
Logger logger = Logger.getLogger("testSimpleKeyFileName");
SimpleKeyFile simpleKeyFile = new SimpleKeyFile();
simpleKeyFile.setLogger(logger, "testSimpleKeyFileRealm");
Logger result = simpleKeyFile.getLogger();
assertSame("result", logger, result);
}
use of org.jpos.util.Logger in project jPOS by jpos.
the class DUKPTTest method initLogger.
private void initLogger() {
Logger logger = new Logger();
logger.addListener(new SimpleLogListener());
log = new Log(logger, "SM Test");
}
use of org.jpos.util.Logger in project jPOS by jpos.
the class Q2 method getLog.
public Log getLog() {
if (log == null) {
Logger logger = Logger.getLogger(LOGGER_NAME);
if (!hasSystemLogger && !logger.hasListeners() && cli == null)
logger.addListener(new SimpleLogListener(System.out));
log = new Log(logger, REALM);
}
return log;
}
use of org.jpos.util.Logger in project jPOS by jpos.
the class QFactory method setLogger.
public void setLogger(Object obj, Element e) {
if (obj instanceof LogSource) {
String loggerName = e.getAttributeValue("logger");
if (loggerName != null) {
String realm = e.getAttributeValue("realm");
if (realm == null)
realm = e.getName();
Logger logger = Logger.getLogger(loggerName);
((LogSource) obj).setLogger(logger, realm);
}
}
}
use of org.jpos.util.Logger in project jPOS by jpos.
the class XMLPackagerTest method testSetLogger.
@Test
public void testSetLogger() throws Throwable {
Logger logger = Logger.getLogger("testXMLPackagerName");
xMLPackager.setLogger(logger, "testXMLPackagerRealm");
assertSame("xMLPackager.logger", logger, xMLPackager.logger);
assertEquals("xMLPackager.realm", "testXMLPackagerRealm", xMLPackager.realm);
}
Aggregations