Configure Log4j

Log4j to support either the WebLogic Admin server or the Managed WebLogic Server.

To configure Log4j:
  1. Set the JVM system property log4j.configurationFile to point to the log4j2.properties file. For example:
    Dlog4j.configurationFile=<AppServer_domain_config_dir>/hrl/config/log4j2.properties
  2. In the WebLogic application server, set the JVM system property log4j.configurationFile.

    This example is only one way to set the property. For details, refer to the WebLogic Administration Guide.

    If you are deploying HRL to AdminServer, edit the <WL_domain>/bin/startWebLogic.sh. Change this line from
    SAVE_JAVA_OPTIONS="${JAVA_OPTIONS}"
    to
    SAVE_JAVA_OPTIONS="${JAVA_OPTIONS} -Dlog4j.configurationFile=<AppServer_domain_config_dir>/hrl/config/log4j2.properties"
    If you are deploying HRL to Managed WebLogic Server, edit the <WL_domain>/bin/startManagedWebLogic.sh. Change the following line from
    JAVA_OPTIONS="${JAVA_OPTIONS}"
    to
    JAVA_OPTIONS="${JAVA_OPTIONS} -Dlog4j.configurationFile=<AppServer_domain_configdir>/hrl/config/log4j2.properties"
    Enter the text of the second step here.
  3. Before starting the application server, verify and update log4j2.properties to contain the proper log level and log file paths. Replace the string ${com.sun.aas.instanceRoot} with ${user.dir}.