Class LoggingConfigurationEndpoint

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean

    @Endpoint(id="loggingConfig",
              enableByDefault=false)
    public class LoggingConfigurationEndpoint
    extends org.apereo.cas.web.BaseCasActuatorEndpoint
    implements org.springframework.beans.factory.InitializingBean
    Controller to handle the logging dashboard requests.
    Since:
    4.2
    • Field Summary

      • Fields inherited from class org.apereo.cas.web.BaseCasActuatorEndpoint

        casProperties
    • Constructor Summary

      Constructors 
      Constructor Description
      LoggingConfigurationEndpoint​(org.apereo.cas.configuration.CasConfigurationProperties casProperties, org.springframework.core.io.ResourceLoader resourceLoader, org.springframework.core.env.Environment environment)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      java.util.Map<java.lang.String,​java.lang.Object> configuration()
      Configuration map.
      void initialize()
      Init.
      void updateLoggerLevel​(java.lang.String loggerName, java.lang.String loggerLevel, boolean additive)
      Looks up the logger in the logger factory, and attempts to find the real logger instance based on the underlying logging framework and retrieve the logger object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LoggingConfigurationEndpoint

        public LoggingConfigurationEndpoint​(org.apereo.cas.configuration.CasConfigurationProperties casProperties,
                                            org.springframework.core.io.ResourceLoader resourceLoader,
                                            org.springframework.core.env.Environment environment)
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • initialize

        public void initialize()
        Init. Attempts to locate the logging configuration to insert listeners. The log configuration location is pulled directly from the environment given there is not an explicit property mapping for it provided by Boot, etc.
      • configuration

        @ReadOperation
        public java.util.Map<java.lang.String,​java.lang.Object> configuration()
        Configuration map.
        Returns:
        the map
      • updateLoggerLevel

        @WriteOperation
        public void updateLoggerLevel​(@Selector
                                      java.lang.String loggerName,
                                      java.lang.String loggerLevel,
                                      boolean additive)
        Looks up the logger in the logger factory, and attempts to find the real logger instance based on the underlying logging framework and retrieve the logger object. Then, updates the level. This functionality at this point is heavily dependant on the log4j API.
        Parameters:
        loggerName - the logger name
        loggerLevel - the logger level
        additive - the additive nature of the logger