Skip to main content
CollegeSource Production

OAS, Steps for log4.j.xml Configuration

CollegeSource recommends using the log4j.properties file instead of the log4j.xml file due to it's simplified format. 

NOTE: Either file may be used. If you have followed the log4j.properties steps, DO NOT follow these steps!

  1. Added a directory for the log4j.xml file

1. Download log4j.xml

The Oracle Application Server needs a slightly different log4j.xml file than JBoss, so download the file named log4j.xml from the following page: Oracle App Server


Technical documentation for the Oracle App Server is still maintained in the Support Center at this time.


 

For the external CEG to successfully find this file, ensure the following:

  1. The file must be named log4j.xml
  2. The log4j.xml file must reside in a directory you have added (or will add) to the application classpath (i.e., an external path) through the OAS console
  3. The Operating System owner (i.e., executor) of the Java process must have Execute and Read permission for all directories in the path and the log4j.xml file

2. Edit log4j.xml

The log4j.xml file must be edited for your specific needs.

3. Find CEG Appender Section

Open log4j.xml with a text editor and go to the section that looks like this:

<!-- CEG Appender  -->

<!--

 uncomment when  ceg4 is used

   <appender name="CEG4" class="org.apache.log4j.RollingFileAppender">

      <param name="File" value="/home/cas/logs/ceg4.log" />

      <param name="Append" value="true" />

      <param name="MaxFileSize" value="10MB"/>

      <param name="MaxBackupIndex" value="25"/>

 

      <layout class="org.apache.log4j.PatternLayout">

         <param name="ConversionPattern" value="%d{MM/dd HH:mm:ss,SSS} %5p [ceg4] [%t] [%c] %m%n" />

      </layout>

   </appender>

-->

4. Remove CEG Appender xml Comments

Remove the xml comment lines so the section now looks like this:

<appender name="CEG4" class="org.apache.log4j.RollingFileAppender">

   <param name="File" value="/home/cas/logs/ceg4.log" />

   <param name="Append" value="true" />

   <param name="MaxFileSize" value="10MB"/>

   <param name="MaxBackupIndex" value="25"/>

 

   <layout class="org.apache.log4j.PatternLayout">

      <param name="ConversionPattern" value="%d{MM/dd HH:mm:ss,SSS} %5p [ceg4] [%t] [%c] %m%n" />

   </layout>

</appender>

5. Revise the ceg4 Log File Path

Go to the line that looks like this:

<param name="File" value="/home/cas/logs/ceg4.log" />

The value specifies the full path filename of the log file to be written by the logging framework. Change the value attribute to be the directory you want the log files written to.

The Operating System owner (i.e., executor) of the java process must have Execute, Write, and Read permission for all directories in the path for the external CEG log files to be successfully written.

6. Save Your Changes

  • Was this article helpful?