[java-identity-provider COMMIT] in /trunk: idp-attribute-cli/src/main/resources/conf/internal.xml idp-core/src/main/j...
noreply at shibboleth.net
noreply at shibboleth.net
Sun Nov 24 10:25:26 EST 2013
Author: rdw
Date: Sun Nov 24 10:25:26 2013
New Revision: 4967
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4967&view=rev
Log:
IdP-298 Remove Use of Shibboleth Resources in logback configurations
Modified:
trunk/idp-attribute-cli/src/main/resources/conf/internal.xml
trunk/idp-core/src/main/java/net/shibboleth/idp/log/LogbackLoggingService.java
Modified: trunk/idp-attribute-cli/src/main/resources/conf/internal.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-cli/src/main/resources/conf/internal.xml?rev=4967&r1=4966&r2=4967&view=diff
==============================================================================
--- trunk/idp-attribute-cli/src/main/resources/conf/internal.xml (original)
+++ trunk/idp-attribute-cli/src/main/resources/conf/internal.xml Sun Nov 24 10:25:26 2013
@@ -8,9 +8,7 @@
<bean id="shibboleth.LogbackLogging" class="net.shibboleth.idp.log.LogbackLoggingService" init-method="start" destroy-method="stop">
<property name="id" value="shibboleth.LogbackLogging"/>
<property name="loggingConfiguration">
- <bean class="net.shibboleth.utilities.java.support.resource.ClasspathResource" init-method="initialize" destroy-method="destroy">
- <constructor-arg value="conf/logging.xml"/>
- </bean>
+ <constructor-arg value="conf/logging.xml"/>
</property>
<property name="reloadCheckDelay" value="0"/>
</bean>
Modified: trunk/idp-core/src/main/java/net/shibboleth/idp/log/LogbackLoggingService.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-core/src/main/java/net/shibboleth/idp/log/LogbackLoggingService.java?rev=4967&r1=4966&r2=4967&view=diff
==============================================================================
--- trunk/idp-core/src/main/java/net/shibboleth/idp/log/LogbackLoggingService.java (original)
+++ trunk/idp-core/src/main/java/net/shibboleth/idp/log/LogbackLoggingService.java Sun Nov 24 10:25:26 2013
@@ -26,10 +26,9 @@
import net.shibboleth.idp.service.ServiceException;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
import net.shibboleth.utilities.java.support.component.ComponentValidationException;
-import net.shibboleth.utilities.java.support.resource.Resource;
-import net.shibboleth.utilities.java.support.resource.ResourceException;
import org.slf4j.LoggerFactory;
+import org.springframework.core.io.Resource;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.joran.JoranConfigurator;
@@ -52,7 +51,7 @@
private StatusManager statusManager;
/** URL to the fallback logback configuration found in the IdP jar. */
- private URL fallbackConfiguraiton;
+ private URL fallbackConfiguration;
/** Logging configuration resource. */
private Resource configurationResource;
@@ -82,25 +81,20 @@
/** {@inheritDoc} */
public void validate() throws ComponentValidationException {
super.validate();
- try {
- if (!configurationResource.exists()) {
- throw new ComponentValidationException("Logging service configuration resource "
- + configurationResource.getLocation() + " does not exist.");
- }
- } catch (ResourceException e) {
- throw new ComponentValidationException("Unable to determing if logging service configuration resource "
- + configurationResource.getLocation(), e);
+ if (!configurationResource.exists()) {
+ throw new ComponentValidationException("Logging service configuration resource "
+ + configurationResource.getDescription() + " does not exist.");
}
}
/** {@inheritDoc} */
protected boolean shouldReload() {
try {
- return configurationResource.getLastModifiedTime() > getLastSuccessfulReloadInstant().getMillis();
- } catch (ResourceException e) {
+ return configurationResource.lastModified() > getLastSuccessfulReloadInstant().getMillis();
+ } catch (IOException e) {
statusManager.add(new ErrorStatus(
"Error checking last modified time of logging service configuration resource "
- + configurationResource.getLocation(), this, e));
+ + configurationResource.getDescription(), this, e));
return false;
}
}
@@ -121,16 +115,16 @@
InputStream ins = null;
try {
statusManager.add(new InfoStatus("Loading new logging configuration resource: "
- + configurationResource.getLocation(), this));
+ + configurationResource.getDescription(), this));
ins = configurationResource.getInputStream();
loadLoggingConfiguration(ins);
} catch (Exception e) {
Closeables.closeQuietly(ins);
statusManager.add(new ErrorStatus("Error loading logging configuration file: "
[... 19 lines stripped ...]
More information about the commits
mailing list