Package org.alfresco.repo.module
Class LoggerModuleComponent
java.lang.Object
org.alfresco.repo.module.AbstractModuleComponent
org.alfresco.repo.module.LoggerModuleComponent
- All Implemented Interfaces:
ModuleComponent,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
Module component that logs a message on startup. The log category used will be the ID of the module that contains the component and the name of the component itself. For example:
log4j.logger.org.alfresco.modules.MyModule.DumpMessageComponent = INFO
- Since:
- 2.1
- Author:
- Derek Hulley
-
Field Summary
Fields inherited from class org.alfresco.repo.module.AbstractModuleComponent
authenticationComponent, moduleService, serviceRegistry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidChecks for the presence of all generally-required properties.protected voidThe method that performs the actual work.voidsetLogLevel(String logLevel) Set the level at which the bean must log the message.voidsetMessage(String message) Set the message that must be logged.Methods inherited from class org.alfresco.repo.module.AbstractModuleComponent
equals, execute, getAppliesFromVersionNumber, getAppliesToVersionNumber, getDependsOn, getDescription, getModuleId, getName, getSinceVersionNumber, hashCode, init, isExecuteOnceOnly, setAppliesFromVersion, setAppliesToVersion, setAuthenticationComponent, setBeanName, setDependsOn, setDescription, setExecuteOnceOnly, setModuleId, setModuleService, setName, setServiceRegistry, setSinceVersion, setTenantAdminService, shutdown, toString
-
Constructor Details
-
LoggerModuleComponent
public LoggerModuleComponent()
-
-
Method Details
-
setLogLevel
Set the level at which the bean must log the message.- Parameters:
logLevel- One of theLogLevelvalues. The default isLogLevel#INFO.
-
setMessage
Set the message that must be logged. This can be a message string or an ID of an internationalized string.- Parameters:
message- a message to log at thelog level
-
checkProperties
protected void checkProperties()Description copied from class:AbstractModuleComponentChecks for the presence of all generally-required properties.- Overrides:
checkPropertiesin classAbstractModuleComponent
-
executeInternal
Description copied from class:AbstractModuleComponentThe method that performs the actual work. For the most part, derived classes will only have to override this method to be fully functional.- Specified by:
executeInternalin classAbstractModuleComponent- Throws:
Throwable- any problems, just throw them
-