public class LogbackLoggingService extends AbstractReloadableService<Object> implements ApplicationContextAware
AbstractReloadableService.ServiceReloadTask| 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 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()
Performs the actual reload.
|
Resource |
getLoggingConfiguration()
Gets the logging configuration.
|
ServiceableComponent<Object> |
getServiceableComponent()
Get the serviceable component that this service supports .
|
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.
|
void |
setApplicationContext(ApplicationContext context) |
void |
setLoggingConfiguration(Resource configuration)
Sets the logging configuration.
|
protected boolean |
shouldReload()
Called by the
AbstractReloadableService.ServiceReloadTask to determine if the service should be reloaded. |
getLastReloadAttemptInstant, getLastSuccessfulReloadInstant, getLogPrefix, getReloadCheckDelay, getReloadFailureCause, getReloadTaskTimer, isFailFast, isRunning, reload, setFailFast, setReloadCheckDelay, setReloadTaskTimer, start, stopsetIdgetIddestroy, doDestroy, initialize, isDestroyed, isInitializedprivate ch.qos.logback.classic.LoggerContext loggerContext
private ch.qos.logback.core.status.StatusManager statusManager
private Resource fallbackConfiguration
private Resource configurationResource
@Nullable private ApplicationContext applicationContext
public Resource getLoggingConfiguration()
public void setLoggingConfiguration(Resource configuration)
configuration - logging configurationpublic void setApplicationContext(ApplicationContext context)
setApplicationContext in interface ApplicationContextAwareprotected boolean shouldReload()
AbstractReloadableService.ServiceReloadTask to determine if the service should be reloaded.
No lock is held when this method is called, so any locking needed should be handled internally.
shouldReload in class AbstractReloadableService<Object>protected void doReload()
throws ServiceException
No lock is held when this method is called, so any locking needed should be handled internally.
doReload in class AbstractReloadableService<Object>ServiceException - thrown if there is a problem reloading the serviceprotected void loadLoggingConfiguration()
throws ServiceException
ServiceException - thrown if there is a problem loading the logging configurationprotected void loadLoggingConfiguration(InputStream loggingConfig) throws ServiceException
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 doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class AbstractReloadableService<Object>net.shibboleth.utilities.java.support.component.ComponentInitializationException@Nullable public ServiceableComponent<Object> getServiceableComponent()
getServiceableComponent in interface ReloadableService<Object>Copyright © 1999–2014. All rights reserved.