/**
* @return An instance of the TN5250jLogger.
*/
public static TN5250jLogger getLogger (String clazzName) {
TN5250jLogger logger = null;
if (_loggers.containsKey(clazzName)) {
logger = ( TN5250jLogger ) _loggers.get(clazzName);
}
else {
if (customLogger != null) {
try {
Class classObject = Class.forName(customLogger);
Object object = classObject.newInstance();
if (object instanceof TN5250jLogFactory) {
logger = (TN5250jLogger) object;
}
}
catch (Exception ex) { ; }
}
else {
if (logger == null) {
if (log4j)
logger = new Log4jLogger();
else
// take the default logger.
logger = new ConsoleLogger();
}
logger.initialize(clazzName);
logger.setLevel(level);
_loggers.put(clazzName, logger);
}
}
return logger;