OC 4 J_LOG
Back to current versionRestore this version

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

Rotating OC4J Server Logs#

This logfile 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 'cronos'. All paths are relative to <ORACLE_HOME>.

opmn.xml

<process-type id="cronos" ...
   <data id="java-options" value="-server -Xmx512m   -Dstdstream.filesize=1  -Dstdstream.filenumber=10
           -Djava.security.policy=$ORACLE_HOME/j2ee/cronos/config/java2.policy -Djava.awt.headless=true
           -Dhttp.webdir.enable=false"/>
   <data id="oc4j-options" value="-out ..\..\opmn\logs\OC4J.log -err   ..\..\opmn\logs\OC4J.log"/>