Class 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 Detail

      • LoggerModuleComponent

        public LoggerModuleComponent()
    • Method Detail

      • setLogLevel

        public void setLogLevel​(java.lang.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​(java.lang.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
      • executeInternal

        protected void executeInternal()
                                throws java.lang.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:
        java.lang.Throwable - any problems, just throw them