Class Log4jIntegrationModule
- java.lang.Object
-
- com.google.inject.AbstractModule
-
- org.arakhne.afc.bootique.log4j.modules.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Log4jIntegrationModule.LogInitTrigger
Logger init trigger.
-
Constructor Summary
Constructors Constructor Description Log4jIntegrationModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configure()
Log4jIntegrationConfig
getLog4jIntegrationConfig(io.bootique.config.ConfigurationFactory configFactory, com.google.inject.Injector injector)
Replies the instance of the log4j integration configuration..org.apache.log4j.Logger
provideRootLogger(io.bootique.config.ConfigurationFactory configFactory, com.google.inject.Provider<Log4jIntegrationConfig> config)
Provide the root logger.-
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
-
-
-
Method Detail
-
configure
protected void configure()
- Overrides:
configure
in classcom.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.
-
-