1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00

Further improved logging in SmackConfiguration

This commit is contained in:
Florian Schmaus 2014-03-25 09:08:28 +01:00
parent 53ca314b50
commit 2250944ca6

View file

@ -335,8 +335,8 @@ public final class SmackConfiguration {
else {
logLevel = Level.WARNING;
}
LOGGER.log(logLevel, "A startup class [" + className
+ "] specified in smack-config.xml could not be loaded: ");
LOGGER.log(logLevel, "A startup class '" + className
+ "' specified in smack-config.xml could not be loaded.");
if (!optional) {
throw cnfe;
} else {
@ -346,7 +346,14 @@ public final class SmackConfiguration {
if (SmackInitializer.class.isAssignableFrom(initClass)) {
SmackInitializer initializer = (SmackInitializer) initClass.newInstance();
initializer.initialize();
List<Exception> exceptions = initializer.getExceptions();
if (exceptions.size() == 0) {
LOGGER.log(Level.FINE, "Loaded SmackInitializer " + className);
} else {
for (Exception e : exceptions) {
LOGGER.log(Level.SEVERE, "Exception in loadSmackClass", e);
}
}
} else {
LOGGER.log(Level.FINE, "Loaded " + className);
}