Setting up log4j1 logging for Sterling Configurator

Sterling Configurator uses the log4j1 utility to provide the logging functionality. You can modify the logging parameters in the log4j1 configuration file to control the location and level of the log files.

  1. Create the file in the <config_repo_home>/omniconfigurator/<property_repository> directory. For example, <config_repo_home>/omniconfigurator/properties.
  2. Copy and paste the following content into the file:
    status = error
    rootLogger.level = DEBUG
    property.filename = configurator.out
    appenders = file, console
    # Redirect log messages to console
    appender.console.type = Console = STDOUT
    appender.console.layout.type = PatternLayout
    appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1} - %m%n
    # Redirect log messages to a log file, support file rolling.
    appender.file.type = RollingFile = File
    appender.file.fileName = /opt/IBM/configurator_logs/${filename}
    appender.file.filePattern = /opt/IBM/configurator_logs/${filename}.%i
    appender.file.layout.type = PatternLayout
    appender.file.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1} - %m%n 
    appender.file.policies.type = Policies
    appender.file.policies.size.type = SizeBasedTriggeringPolicy
    appender.file.strategy.type = DefaultRolloverStrategy
    appender.file.strategy.max = 10
    rootLogger.appenderRefs = file, console
    rootLogger.appenderRef.console.ref = STDOUT
    rootLogger.appenderRef.file.ref = File
    loggers = file = com.comergent.apps.configurator.initializer.FunctionLoader
    logger.file.level = debug
    logger.file.additivity = false
    logger.file.appenderRef.file.ref = File
Note: Before setting up the logging parameters, ensure that you understand the log4j1 utility. For detailed information about this utility, refer to the Apache website.