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

public class LoggerModuleComponent extends AbstractModuleComponent
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
  • Constructor Details

    • LoggerModuleComponent

      public LoggerModuleComponent()
  • Method Details

    • setLogLevel

      public void setLogLevel(String logLevel)
      Set the level at which the bean must log the message.
      Parameters:
      logLevel - One of the LogLevel values. The default is LogLevel#INFO.
    • setMessage

      public void setMessage(String message)
      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 the log level
    • checkProperties

      protected void checkProperties()
      Description copied from class: AbstractModuleComponent
      Checks for the presence of all generally-required properties.
      Overrides:
      checkProperties in class AbstractModuleComponent
    • executeInternal

      protected void executeInternal() throws Throwable
      Description copied from class: AbstractModuleComponent
      The 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:
      executeInternal in class AbstractModuleComponent
      Throws:
      Throwable - any problems, just throw them