The OC4J log file (contained on your application server) is the log file that the application writes all its error messages to.  

!Rotating OC4J Server Logs

This log file can grow to quite a size and you may find it useful to "rotate" the files so that they don't get to large, and can be accessed, backed up , et cetera.

The OC4J server log can be rotated based on the size of the log file in megabytes, or the log file can be rotated daily at a certain hour.  However, the file names of the logs and the paths are different than the current configuration. The __opmn.xml__ file must be edited using the following parameters:

;{{stdstream.filesize=''max_file_size''}}: The maximum size any file in the archive will be allowed to grow to, in megabytes. Files are rotated when this maximum is reached.
;{{stdstream.filenumber=''max_files''}}: The maximum number of files to keep as archives. The oldest file will be automatically deleted when the limit is exceeded.
;{{stdstream.rotatetime=''HH:mm''}}:
The time at which the log file will be rotated each day.


Example:
The instance is called 'Prod'. All paths are relative to <ORACLE_HOME>.

__opmn.xml__
{{{
<process-type id="Prod" ...
   <data id="java-options" value="-server -Dstdstream.filesize=1 -Dstdstream.filenumber=10 -Dstdstream.rotatetime=06:00 -Djava.security.policy=$ORACLE_HOME/j2ee/Prod/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -XX:MaxPermSize=128M -Xmx4G -XX:AppendRatio=3"/>
   <data id="oc4j-options" value="-out ..\..\opmn\logs\OC4J.log -err   ..\..\opmn\logs\OC4J.log"/> 
}}}
* This will create up to 10 log files, each with a size of 1MB.  It will also rotate at 6am each morning no matter what the size is.
* The original log file was in \opmn\logs\OC4J~Prod~default_group~1
* New log here: \opmn\logs\Prod_default_group_1\OC4J_2010_02_28_09_51_20.log
* If no directories are specified in the oc4j-options the new logs will be in \j2ee\home\Prod_default_group_1\


[{If var='loginstatus' contains 'authenticated'

----
![Discussion|Edit:Internal.OC4J_LOG]
[{InsertPage page='Internal.OC4J_LOG' default='Click to create a new discussion page'}]

}]