Class SilverpeasLoggerInitializationListener

  • All Implemented Interfaces:
    EventListener, javax.servlet.ServletContextListener

    public class SilverpeasLoggerInitializationListener
    extends Object
    implements javax.servlet.ServletContextListener
    In order to centralize some logs into a same context, a specific logger class is sometimes provided, such as SseLogger for example.

    By convention, the class name of a specific logger ends with "Logger" characters.

    To get specific loggers initialized, this listener MUST be defined into the web.xml of the archive built of an integration test with arquillian + Wildfly.

    At server starting, when the context of the integration is initialized, each implementation of Initialization interface that the class name ends with the keyword "Logger" is performed.

    To add it easily, WarBuilder.addWebListener(Class) ()} method is provided.

    Author:
    silveryocha
    • Constructor Detail

      • SilverpeasLoggerInitializationListener

        public SilverpeasLoggerInitializationListener()
    • Method Detail

      • contextInitialized

        public void contextInitialized​(javax.servlet.ServletContextEvent sce)
        Specified by:
        contextInitialized in interface javax.servlet.ServletContextListener
      • contextDestroyed

        public void contextDestroyed​(javax.servlet.ServletContextEvent sce)
        Specified by:
        contextDestroyed in interface javax.servlet.ServletContextListener