Class Log4jIntegrationModule

  • All Implemented Interfaces:
    com.google.inject.Module

    public class Log4jIntegrationModule
    extends com.google.inject.AbstractModule
    Module for log4j.
    Since:
    15.0
    Version:
    17.0 2020-01-04 14:41:57
    Author:
    Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.bootique
    Maven Artifact Id:
    bootique-log4j
    • Constructor Detail

      • Log4jIntegrationModule

        public Log4jIntegrationModule()
    • Method Detail

      • configure

        protected void configure()
        Overrides:
        configure in class com.google.inject.AbstractModule
      • getLog4jIntegrationConfig

        @Provides
        public Log4jIntegrationConfig getLog4jIntegrationConfig​(io.bootique.config.ConfigurationFactory configFactory,
                                                                com.google.inject.Injector injector)
        Replies the instance of the log4j integration configuration..
        Parameters:
        configFactory - accessor to the bootique factory.
        injector - the current injector.
        Returns:
        the configuration accessor.
      • provideRootLogger

        @Provides
        public org.apache.log4j.Logger provideRootLogger​(io.bootique.config.ConfigurationFactory configFactory,
                                                         com.google.inject.Provider<Log4jIntegrationConfig> config)
        Provide the root logger.
        Parameters:
        configFactory - the factory of configurations.
        config - the logger configuration.
        Returns:
        the root logger.