Updating your log4j logging configuration

This topic outlines how to modify your logging configuration directly by modifying the log.conf file in your clock installation directory. Details about how to update the rootLogger logging level are outlined in Modifying log file settings using Admin Console, but this topic also provides instructions for updating the logging configuration for specific classes of the clock.

Note: You may need to consult with Infor Support before changing logging levels. For example, setting the logging level to debug can result in performance issues and extremely large log files which may also have an impact on performance.

To update your log4j logging configuration:

  1. Navigate to <Clock_installation_directory>/osgi and open the log.conf file in a text editor of your preference.

    The log.conf file contains the logging configuration for the rootLogger and specific clock classes. Log levels are specified in order of increasing detail: (fatal, error, warn, info, debug).

  2. To update the rootLogger to debug from the default value of warn, you can change the log4j.rootLogger=warn, fileRoll, mem setting to this value:
    log4j.rootLogger=debug, fileRoll, mem
    Note: In general, the rootLogger setting should only be modified with the recommendation of Infor Support. If you increase the logging detail for all packages in the clock, this can result in too much logging information in the log files. In most cases, it is usually advantageous to modify the log file settings for a specific package as is outlined in the next steps.
  3. To change the logging level for specific classes, you can do the following for this sample clock class that is set to a logging level of info:
    
    log4j.logger.com.infor.wfm.clock.sample.class=info, fileRoll, mem
    log4j.additivity.com.infor.wfm.clock.sample.class=false
  4. Make this change to set the logging level for the class to debug:
    
    log4j.logger.com.infor.wfm.clock.sample.class=debug, fileRoll, mem
    log4j.additivity.com.infor.wfm.clock.sample.class=false
  5. Save the log.conf file.

You may need to restart the clock for the changes to take effect.

You can also refer to the comments in the log.conf file for more information on how to configure log4j logging and the specific classes to enable depending on what issues are being troubleshooted.

For more information on the log4j logging framework, see http://logging.apache.org/log4j.