mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 14:02:06 +01:00
Further improved logging in SmackConfiguration
This commit is contained in:
parent
53ca314b50
commit
2250944ca6
1 changed files with 10 additions and 3 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue