Author: nickarls
Date: 2010-03-15 09:45:23 -0400 (Mon, 15 Mar 2010)
New Revision: 6049
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/util/serviceProvider/DefaultServiceLoader.java
Log:
logX usage
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/util/serviceProvider/DefaultServiceLoader.java
===================================================================
---
core/trunk/impl/src/main/java/org/jboss/weld/util/serviceProvider/DefaultServiceLoader.java 2010-03-15
12:42:37 UTC (rev 6048)
+++
core/trunk/impl/src/main/java/org/jboss/weld/util/serviceProvider/DefaultServiceLoader.java 2010-03-15
13:45:23 UTC (rev 6049)
@@ -40,6 +40,8 @@
import org.jboss.weld.util.collections.EnumerationList;
import org.jboss.weld.util.reflection.SecureReflections;
import org.slf4j.cal10n.LocLogger;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLogger.Level;
/**
* This class handles looking up service providers on the class path. It
@@ -60,7 +62,8 @@
public class DefaultServiceLoader<S> implements Iterable<S>
{
private static LocLogger log = loggerFactory().getLogger(UTIL);
-
+ private static XLogger logX = loggerFactory().getXLogger(UTIL);
+
private static final String SERVICES = "META-INF/services";
/**
@@ -204,7 +207,8 @@
}
catch (IOException e)
{
- throw new ForbiddenStateException(COULD_NOT_READ_SERVICES_FILE, serviceFile,
e);
+ logX.throwing(Level.ERROR, e);
+ throw new ForbiddenStateException(COULD_NOT_READ_SERVICES_FILE, serviceFile);
}
finally
{
@@ -251,10 +255,12 @@
}
catch (ClassNotFoundException e)
{
+ logX.throwing(Level.ERROR, e);
throw new ForbiddenStateException(EXTENSION_CLASS_NOT_FOUND, serviceClassName);
}
catch (ClassCastException e)
{
+ logX.throwing(Level.ERROR, e);
throw new
ForbiddenStateException(DECLARED_EXTENSION_DOES_NOT_IMPLEMENT_EXTENSION,
serviceClassName);
}
return serviceClass;
@@ -269,6 +275,7 @@
}
catch (Exception e)
{
+ logX.throwing(Level.ERROR, e);
throw new ForbiddenStateException(SECURITY_EXCEPTION_SCANNING, serviceClass,
e);
}
}
Show replies by date