OC 4 J_LOG

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"/> 


Notes#

Click to create a new notes page