public class LogbackLoggingService extends net.shibboleth.utilities.java.support.service.AbstractReloadableService<Object> implements LoggingService, ApplicationContextAware
LoggingService that watches for logback configuration file changes
and reloads the file when a change occurs.| Modifier and Type | Field and Description |
|---|---|
private ApplicationContext |
applicationContext
Spring application context.
|
private Resource |
configurationResource
Logging configuration resource.
|
private Resource |
fallbackConfiguration
URL to the fallback logback configuration found in the IdP jar.
|
private LoggerContext |
loggerContext
Logback logger context.
|
private StatusManager |
statusManager
Logger used to log messages without relying on the logging system to be full initialized.
|
| Constructor and Description |
|---|
LogbackLoggingService() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitialize() |
protected void |
doReload() |
Resource |
getLoggingConfiguration()
Gets the logging configuration.
|
net.shibboleth.utilities.java.support.service.ServiceableComponent<Object> |
getServiceableComponent()
.
|
protected void |
loadIdPHomeProperty()
Add the
IdPPropertiesApplicationContextInitializer.IDP_HOME_PROPERTY property from the Spring application
context to the logger context. |
protected void |
loadLoggingConfiguration()
Reads and loads in a new logging configuration.
|
protected void |
loadLoggingConfiguration(InputStream loggingConfig)
Loads a logging configuration in to the active logger context.
|
protected void |
logImplementationDetails()
Log the IdP version and Java version and vendor at INFO level.
|
void |
setApplicationContext(ApplicationContext context) |
void |
setLoggingConfiguration(Resource configuration)
Sets the logging configuration.
|
protected boolean |
shouldReload() |
doDestroy, getLastReloadAttemptInstant, getLastSuccessfulReloadInstant, getLogPrefix, getReloadCheckDelay, getReloadFailureCause, getReloadTaskTimer, isFailFast, reload, setFailFast, setReloadCheckDelay, setReloadTaskTimersetIdgetIddestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLastReloadAttemptInstant, getLastSuccessfulReloadInstant, getReloadFailureCause, reloadprivate LoggerContext loggerContext
private StatusManager statusManager
@NonnullAfterInit private Resource fallbackConfiguration
@NonnullAfterInit private Resource configurationResource
@Nullable private ApplicationContext applicationContext
@NonnullAfterInit public Resource getLoggingConfiguration()
public void setLoggingConfiguration(@Nonnull Resource configuration)
setLoggingConfiguration in interface LoggingServiceconfiguration - logging configurationpublic void setApplicationContext(ApplicationContext context)
setApplicationContext in interface ApplicationContextAware@Nullable public net.shibboleth.utilities.java.support.service.ServiceableComponent<Object> getServiceableComponent()
getServiceableComponent in interface net.shibboleth.utilities.java.support.service.ReloadableService<Object>protected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class net.shibboleth.utilities.java.support.service.AbstractReloadableService<Object>net.shibboleth.utilities.java.support.component.ComponentInitializationExceptionprotected boolean shouldReload()
shouldReload in class net.shibboleth.utilities.java.support.service.AbstractReloadableService<Object>protected void doReload()
doReload in class net.shibboleth.utilities.java.support.service.AbstractReloadableService<Object>protected void loadLoggingConfiguration()
net.shibboleth.utilities.java.support.service.ServiceException - thrown if there is a problem loading the logging configurationprotected void loadLoggingConfiguration(InputStream loggingConfig)
loggingConfig - logging configuration filenet.shibboleth.utilities.java.support.service.ServiceException - thrown is there is a problem loading the logging configurationprotected void loadIdPHomeProperty()
IdPPropertiesApplicationContextInitializer.IDP_HOME_PROPERTY property from the Spring application
context to the logger context.protected void logImplementationDetails()
StandardSystemProperty at DEBUG level.Copyright © 1999–2016 Shibboleth Consortium. All rights reserved.