1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-06-30 07:14:49 +02: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 { else {
logLevel = Level.WARNING; logLevel = Level.WARNING;
} }
LOGGER.log(logLevel, "A startup class [" + className LOGGER.log(logLevel, "A startup class '" + className
+ "] specified in smack-config.xml could not be loaded: "); + "' specified in smack-config.xml could not be loaded.");
if (!optional) { if (!optional) {
throw cnfe; throw cnfe;
} else { } else {
@ -346,7 +346,14 @@ public final class SmackConfiguration {
if (SmackInitializer.class.isAssignableFrom(initClass)) { if (SmackInitializer.class.isAssignableFrom(initClass)) {
SmackInitializer initializer = (SmackInitializer) initClass.newInstance(); SmackInitializer initializer = (SmackInitializer) initClass.newInstance();
initializer.initialize(); initializer.initialize();
LOGGER.log(Level.FINE, "Loaded SmackInitializer " + className); 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 { } else {
LOGGER.log(Level.FINE, "Loaded " + className); LOGGER.log(Level.FINE, "Loaded " + className);
} }