public class LogbackLoggingService extends AbstractReloadableService<Object> implements LoggingService, org.springframework.context.ApplicationContextAware
LoggingService that watches for logback configuration file changes
and reloads the file when a change occurs.AbstractReloadableService.ServiceReloadTask| Modifier and Type | Field and Description |
|---|---|
private org.springframework.context.ApplicationContext |
applicationContext
Spring application context.
|
private org.springframework.core.io.Resource |
configurationResource
Logging configuration resource.
|
private org.springframework.core.io.Resource |
fallbackConfiguration
URL to the fallback logback configuration found in the IdP jar.
|
private ch.qos.logback.classic.LoggerContext |
loggerContext
Logback logger context.
|
private ch.qos.logback.core.status.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() |
org.springframework.core.io.Resource |
getLoggingConfiguration()
Gets the logging configuration.
|
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(org.springframework.context.ApplicationContext context) |
void |
setLoggingConfiguration(org.springframework.core.io.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, reloadinitialize, isInitializedgetIdprivate ch.qos.logback.classic.LoggerContext loggerContext
private ch.qos.logback.core.status.StatusManager statusManager
@NonnullAfterInit private org.springframework.core.io.Resource fallbackConfiguration
@NonnullAfterInit private org.springframework.core.io.Resource configurationResource
@Nullable private org.springframework.context.ApplicationContext applicationContext
@NonnullAfterInit public org.springframework.core.io.Resource getLoggingConfiguration()
public void setLoggingConfiguration(@Nonnull org.springframework.core.io.Resource configuration)
setLoggingConfiguration in interface LoggingServiceconfiguration - logging configurationpublic void setApplicationContext(org.springframework.context.ApplicationContext context)
setApplicationContext in interface org.springframework.context.ApplicationContextAware@Nullable public ServiceableComponent<Object> getServiceableComponent()
getServiceableComponent in interface ReloadableService<Object>protected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractReloadableService<Object>ComponentInitializationExceptionprotected boolean shouldReload()
shouldReload in class AbstractReloadableService<Object>protected void doReload()
doReload in class AbstractReloadableService<Object>protected void loadLoggingConfiguration()
ServiceException - thrown if there is a problem loading the logging configurationprotected void loadLoggingConfiguration(InputStream loggingConfig)
loggingConfig - logging configuration fileServiceException - 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–2018 Shibboleth Consortium. All rights reserved.